-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[PropertyInfo] PhpStan extractor nested object fix #44637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
640a9ac
to
fcecfe1
Compare
fcecfe1
to
1b11e78
Compare
Hey! I think @Korbeil has recently worked with this code. Maybe they can help review this? Cheers! Carsonbot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some cs issues and GTM
|
||
return new NameScope($className, $namespace, $uses); | ||
} | ||
|
||
private function extractFromFullClassName(string $fullClassName): array | ||
private function collectUses(\ReflectionClass $reflection): array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
collectTraits
would be a better name IMHO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think collectUses
sounds more logic in this context, because method collects not only traits, but class uses as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nicolas-grekas rebased the branch, waiting for yours input on remaining issue
src/Symfony/Component/PropertyInfo/PhpStan/NameScopeFactory.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/PropertyInfo/PhpStan/NameScopeFactory.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/PropertyInfo/PhpStan/NameScopeFactory.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/PropertyInfo/PhpStan/NameScopeFactory.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from Nicolas CS fixes it looks good to me too 👍
1b11e78
to
2544689
Compare
2544689
to
78d51de
Compare
Thank you @rmikalkenas. |
PhpStanExtractor wrongly extracts object type when it is in a different namespace