Fix undefined variable fromConstructor when passing context to getTypes
If passing context to getTypes, it checks value of $context['enable_constructor_extraction'] for true/false or the constructor value of enableConstructorExtraction and should then populate fromConstructor if necessary. The missing brackets around the first part of this check mean that fromConstructor is only applied if context is not set. This fixes the issuse described at [symfony/symfony-docs#10969](https://github.com/symfony/symfony-docs/pull/10969)
This commit is contained in:
parent
5b23a2b257
commit
be8d14a129
@ -112,7 +112,7 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp
|
||||
}
|
||||
|
||||
if (
|
||||
$context['enable_constructor_extraction'] ?? $this->enableConstructorExtraction &&
|
||||
($context['enable_constructor_extraction'] ?? $this->enableConstructorExtraction) &&
|
||||
$fromConstructor = $this->extractFromConstructor($class, $property)
|
||||
) {
|
||||
return $fromConstructor;
|
||||
|
Reference in New Issue
Block a user