Skip to content

Commit 6e26d61

Browse files
committed
[Validator] Remove specific check for Valid targets
1 parent a194dba commit 6e26d61

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

Mapping/ClassMetadata.php

-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use Symfony\Component\Validator\Constraint;
1515
use Symfony\Component\Validator\Constraints\GroupSequence;
1616
use Symfony\Component\Validator\Constraints\Traverse;
17-
use Symfony\Component\Validator\Constraints\Valid;
1817
use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
1918
use Symfony\Component\Validator\Exception\GroupDefinitionException;
2019

@@ -183,10 +182,6 @@ public function addConstraint(Constraint $constraint)
183182
throw new ConstraintDefinitionException(sprintf('The constraint "%s" cannot be put on classes.', \get_class($constraint)));
184183
}
185184

186-
if ($constraint instanceof Valid) {
187-
throw new ConstraintDefinitionException(sprintf('The constraint "%s" cannot be put on classes.', \get_class($constraint)));
188-
}
189-
190185
if ($constraint instanceof Traverse) {
191186
if ($constraint->traverse) {
192187
// If traverse is true, traversal should be explicitly enabled

0 commit comments

Comments
 (0)