[PropertyInfo] Fix ReflectionExtractor::getTypesFromConstructor

This commit is contained in:
Maxime Steinhausser 2020-08-28 18:07:48 +02:00
parent 2c4e215ee9
commit 6423d8a827

View 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