Skip to content
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

[PropertyInfo] PhpStan extractor nested object fix #44637

Merged
merged 1 commit into from Dec 26, 2021

Conversation

rmikalkenas
Copy link
Contributor

@rmikalkenas rmikalkenas commented Dec 15, 2021

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

PhpStanExtractor wrongly extracts object type when it is in a different namespace

@carsonbot
Copy link

@carsonbot carsonbot commented Dec 16, 2021

Hey!

I think @Korbeil has recently worked with this code. Maybe they can help review this?

Cheers!

Carsonbot

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Just some cs issues and GTM


return new NameScope($className, $namespace, $uses);
}

private function extractFromFullClassName(string $fullClassName): array
private function collectUses(\ReflectionClass $reflection): array
Copy link
Member

@nicolas-grekas nicolas-grekas Dec 16, 2021

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

Copy link
Contributor Author

@rmikalkenas rmikalkenas Dec 16, 2021

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

Copy link
Contributor Author

@rmikalkenas rmikalkenas Dec 22, 2021

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

Copy link
Contributor

@Korbeil Korbeil left a comment

Apart from Nicolas CS fixes it looks good to me too 👍

@nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented Dec 26, 2021

Thank you @rmikalkenas.

@nicolas-grekas nicolas-grekas merged commit fa99027 into symfony:5.4 Dec 26, 2021
10 of 12 checks passed
@fabpot fabpot mentioned this pull request Dec 29, 2021
@fabpot fabpot mentioned this pull request Dec 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants