X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fsymfony%2Fvalidator%2FConstraints%2FValid.php;h=893942377851f2ba832fdf3d7ba9c7104c7dd417;hb=9e65bae52407293a5182f19dc57b5628b09e92f4;hp=439da3ae0056a4177fb8da765ad7fefa014e968f;hpb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;p=yaffs-website diff --git a/vendor/symfony/validator/Constraints/Valid.php b/vendor/symfony/validator/Constraints/Valid.php index 439da3ae0..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,15 +23,23 @@ class Valid extends Constraint { public $traverse = 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; } - parent::__construct($options); + return parent::__get($option); + } + + /** + * {@inheritdoc} + */ + public function addImplicitGroupName($group) + { + if (null !== $this->groups) { + parent::addImplicitGroupName($group); + } } }