Skip to content

Conversation

wuchen90
Copy link
Contributor

Q A
Branch? 7.3
Bug fix? yes
New feature? no
Deprecations? no
License MIT

The PhpStanExtractor fails when we try to resolve the type of a constructor argument that is declared in parent class.
It is mainly because the TypeContextFactory doesn't get all the uses of parent classes.

@wuchen90 wuchen90 requested a review from dunglas as a code owner September 15, 2025 08:23
@carsonbot carsonbot added this to the 7.3 milestone Sep 15, 2025
@wuchen90 wuchen90 force-pushed the fix-phpstan-extractor branch from 50e234d to 44a8112 Compare September 15, 2025 08:35
@OskarStark OskarStark changed the title [PropertyInfo] Fix getting type from constructor of parent class in PhpStanExtractor [PropertyInfo] Fix getting type from constructor of parent class in PhpStanExtractor Sep 15, 2025
@wuchen90 wuchen90 force-pushed the fix-phpstan-extractor branch from 44a8112 to 35e940e Compare September 15, 2025 13:37
@nicolas-grekas
Copy link
Member

Thank you @wuchen90.

@nicolas-grekas nicolas-grekas merged commit 1ed06ec into symfony:7.3 Sep 15, 2025
if (!$rawDocNode = $reflectionConstructor->getDocComment()) {
return null;
}
$class = $reflectionConstructor->class;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the code to simplify the implementation and remove repeated code.

@fabpot fabpot mentioned this pull request Sep 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants