X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=vendor%2Fsymfony%2Fvalidator%2FConstraints%2FValid.php;h=893942377851f2ba832fdf3d7ba9c7104c7dd417;hb=9e65bae52407293a5182f19dc57b5628b09e92f4;hp=0fb782906522517ed03ee1aa7362e9fac5f9a750;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/vendor/symfony/validator/Constraints/Valid.php b/vendor/symfony/validator/Constraints/Valid.php index 0fb782906..893942377 100644 --- a/vendor/symfony/validator/Constraints/Valid.php +++ b/vendor/symfony/validator/Constraints/Valid.php @@ -12,7 +12,6 @@ namespace Symfony\Component\Validator\Constraints; use Symfony\Component\Validator\Constraint; -use Symfony\Component\Validator\Exception\ConstraintDefinitionException; /** * @Annotation @@ -24,24 +23,23 @@ class Valid extends Constraint { public $traverse = true; - /** - * @deprecated since version 2.5, to be removed in Symfony 3.0. - */ - public $deep = true; - - public function __construct($options = null) + public function __get($option) { - if (is_array($options) && array_key_exists('groups', $options)) { - throw new ConstraintDefinitionException(sprintf( - 'The option "groups" is not supported by the constraint %s', - __CLASS__ - )); + if ('groups' === $option) { + // when this is reached, no groups have been configured + return null; } - if (is_array($options) && array_key_exists('deep', $options)) { - @trigger_error('The "deep" option for the Valid constraint is deprecated since version 2.5 and will be removed in 3.0. When traversing arrays, nested arrays are always traversed. When traversing nested objects, their traversal strategy is used.', E_USER_DEPRECATED); - } + return parent::__get($option); + } - parent::__construct($options); + /** + * {@inheritdoc} + */ + public function addImplicitGroupName($group) + { + if (null !== $this->groups) { + parent::addImplicitGroupName($group); + } } }