Skip to content

Commit

Permalink
[Validator] Remove specific check for Valid targets
Browse files Browse the repository at this point in the history
  • Loading branch information
ogizanagi committed Feb 21, 2020
1 parent 643f34f commit 0086562
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/Symfony/Component/Validator/Mapping/ClassMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\Constraints\GroupSequence;
use Symfony\Component\Validator\Constraints\Traverse;
use Symfony\Component\Validator\Constraints\Valid;
use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
use Symfony\Component\Validator\Exception\GroupDefinitionException;

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

if ($constraint instanceof Valid) {
throw new ConstraintDefinitionException(sprintf('The constraint "%s" cannot be put on classes.', \get_class($constraint)));
}

if ($constraint instanceof Traverse) {
if ($constraint->traverse) {
// If traverse is true, traversal should be explicitly enabled
Expand Down

0 comments on commit 0086562

Please sign in to comment.