From ffac6b9a3bdf469a4c72fe554b304774f9d2bc14 Mon Sep 17 00:00:00 2001 From: David Date: Thu, 27 Nov 2025 16:20:30 +0100 Subject: [PATCH] Fixed symfony constraints visitor --- src/Visitor/Php/Symfony/ValidationAnnotation.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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()); } }