diff --git a/src/Visitor/Php/Symfony/ValidationAnnotation.php b/src/Visitor/Php/Symfony/ValidationAnnotation.php index a539f58..51c4617 100644 --- a/src/Visitor/Php/Symfony/ValidationAnnotation.php +++ b/src/Visitor/Php/Symfony/ValidationAnnotation.php @@ -73,10 +73,10 @@ public function enterNode(Node $node): ?Node return null; } - $this->extractFromConstraints($metadata->constraints); - foreach ($metadata->members as $members) { - foreach ($members as $member) { - $this->extractFromConstraints($member->constraints); + $this->extractFromConstraints($metadata->getConstraints()); + foreach ($metadata->getConstrainedProperties() as $property) { + foreach ($metadata->getPropertyMetadata($property) as $member) { + $this->extractFromConstraints($member->getConstraints()); } }