Security update for Core, with self-updated composer
[yaffs-website] / vendor / symfony / validator / Mapping / GenericMetadata.php
index 97915ac71307f1b891f31cefbe5ddf27ad858561..ff1cb6d37f89e20d667bd011236f71771dd9e852 100644 (file)
@@ -14,9 +14,7 @@ namespace Symfony\Component\Validator\Mapping;
 use Symfony\Component\Validator\Constraint;
 use Symfony\Component\Validator\Constraints\Traverse;
 use Symfony\Component\Validator\Constraints\Valid;
-use Symfony\Component\Validator\Exception\BadMethodCallException;
 use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
-use Symfony\Component\Validator\ValidationVisitorInterface;
 
 /**
  * A generic container of {@link Constraint} objects.
@@ -110,13 +108,10 @@ class GenericMetadata implements MetadataInterface
      *
      * If the constraint {@link Valid} is added, the cascading strategy will be
      * changed to {@link CascadingStrategy::CASCADE}. Depending on the
-     * properties $traverse and $deep of that constraint, the traversal strategy
+     * $traverse property of that constraint, the traversal strategy
      * will be set to one of the following:
      *
-     *  - {@link TraversalStrategy::IMPLICIT} if $traverse is enabled and $deep
-     *    is enabled
-     *  - {@link TraversalStrategy::IMPLICIT} | {@link TraversalStrategy::STOP_RECURSION}
-     *    if $traverse is enabled, but $deep is disabled
+     *  - {@link TraversalStrategy::IMPLICIT} if $traverse is enabled
      *  - {@link TraversalStrategy::NONE} if $traverse is disabled
      *
      * @param Constraint $constraint The constraint to add
@@ -140,12 +135,7 @@ class GenericMetadata implements MetadataInterface
             $this->cascadingStrategy = CascadingStrategy::CASCADE;
 
             if ($constraint->traverse) {
-                // Traverse unless the value is not traversable
                 $this->traversalStrategy = TraversalStrategy::IMPLICIT;
-
-                if (!$constraint->deep) {
-                    $this->traversalStrategy |= TraversalStrategy::STOP_RECURSION;
-                }
             } else {
                 $this->traversalStrategy = TraversalStrategy::NONE;
             }
@@ -223,21 +213,4 @@ class GenericMetadata implements MetadataInterface
     {
         return $this->traversalStrategy;
     }
-
-    /**
-     * Exists for compatibility with the deprecated
-     * {@link Symfony\Component\Validator\MetadataInterface}.
-     *
-     * Should not be used.
-     *
-     * Implemented for backward compatibility with Symfony < 2.5.
-     *
-     * @throws BadMethodCallException
-     *
-     * @deprecated since version 2.5, to be removed in 3.0.
-     */
-    public function accept(ValidationVisitorInterface $visitor, $value, $group, $propertyPath)
-    {
-        throw new BadMethodCallException('Not supported.');
-    }
 }