From b2bdf210b0ab5f11877725c6915542aec9c15571 Mon Sep 17 00:00:00 2001 From: djordy Date: Fri, 25 Oct 2024 00:17:47 +0200 Subject: [PATCH] remove unnecessary instance check for constraint --- .../Annotations/SymfonyConstraintAnnotationReader.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/ModelDescriber/Annotations/SymfonyConstraintAnnotationReader.php b/src/ModelDescriber/Annotations/SymfonyConstraintAnnotationReader.php index 1570641c4..d6b88df39 100644 --- a/src/ModelDescriber/Annotations/SymfonyConstraintAnnotationReader.php +++ b/src/ModelDescriber/Annotations/SymfonyConstraintAnnotationReader.php @@ -185,10 +185,6 @@ private function getAnnotations(Context $parentContext, $reflection, ?array $val $this->setContextFromReflection($parentContext, $reflection); foreach ($this->locateAnnotations($reflection) as $annotation) { - if (!$annotation instanceof Constraint) { - continue; - } - if (!$this->useValidationGroups || $this->isConstraintInGroup($annotation, $validationGroups)) { yield $annotation; }