From 6423d8a827728b8508e1d3172b42b17fc7064025 Mon Sep 17 00:00:00 2001 From: Maxime Steinhausser Date: Fri, 28 Aug 2020 18:07:48 +0200 Subject: [PATCH] [PropertyInfo] Fix ReflectionExtractor::getTypesFromConstructor --- .../Component/PropertyInfo/Extractor/ReflectionExtractor.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php b/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php index d9fd45b439..c26342a038 100644 --- a/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php +++ b/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php @@ -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