X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=vendor%2Fsymfony%2Fvalidator%2FMapping%2FGenericMetadata.php;h=ff1cb6d37f89e20d667bd011236f71771dd9e852;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hp=97915ac71307f1b891f31cefbe5ddf27ad858561;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/vendor/symfony/validator/Mapping/GenericMetadata.php b/vendor/symfony/validator/Mapping/GenericMetadata.php index 97915ac71..ff1cb6d37 100644 --- a/vendor/symfony/validator/Mapping/GenericMetadata.php +++ b/vendor/symfony/validator/Mapping/GenericMetadata.php @@ -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.'); - } }