[PropertyInfo] Fix ReflectionExtractor::getTypesFromConstructor
authorMaxime Steinhausser <maxime.steinhausser@elao.com>
Fri, 28 Aug 2020 16:07:48 +0000 (18:07 +0200)
committerMaxime Steinhausser <maxime.steinhausser@elao.com>
Fri, 28 Aug 2020 16:07:48 +0000 (18:07 +0200)
src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php

index d9fd45b..c26342a 100644 (file)
@@ -194,11 +194,11 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp
         if (!$reflectionType = $reflectionParameter->getType()) {
             return null;
         }
-        if (!$type = $this->extractFromReflectionType($reflectionType, $reflectionConstructor)) {
+        if (!$types = $this->extractFromReflectionType($reflectionType, $reflectionConstructor->getDeclaringClass())) {
             return null;
         }
 
-        return [$type];
+        return $types;
     }
 
     private function getReflectionParameterFromConstructor(string $property, \ReflectionMethod $reflectionConstructor): ?\ReflectionParameter