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] Restrict access to PhpStanExtractor based on visibility #53362

Merged

Conversation

nikophil
Copy link
Contributor

@nikophil nikophil commented Jan 2, 2024

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

Hi,

this small PR gives a bit more control on what PhpStanExtractor can see or not, based on the visibility of the property or its accessor.

It's pretty unusual, but sometimes, the getter does not return the same type than the property itself, and before this PR, there was actually no way to extract the type returned by the getter. ReflectionExtractor has this granularity, but it cannot read complex PhpDoc types.

@nikophil nikophil force-pushed the property-info/visibility-in-phpstan-extractor branch from fc8e374 to 09bfe6f Compare January 3, 2024 09:01
Copy link
Contributor

@Korbeil Korbeil left a comment

Choose a reason for hiding this comment

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

It looks good to me 👍

Copy link
Member

@dunglas dunglas left a comment

Choose a reason for hiding this comment

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

Overall, LGTM!

@nikophil nikophil force-pushed the property-info/visibility-in-phpstan-extractor branch from 09bfe6f to c970f96 Compare January 5, 2024 09:18
@OskarStark OskarStark changed the title [PropertyInfo] restrict access to PhpStanExtractor based on visibility [PropertyInfo] Restrict access to PhpStanExtractor based on visibility Jan 5, 2024
@nikophil nikophil force-pushed the property-info/visibility-in-phpstan-extractor branch 2 times, most recently from 34d2ad9 to a03f5ec Compare January 8, 2024 10:14
@nikophil nikophil force-pushed the property-info/visibility-in-phpstan-extractor branch from a03f5ec to e3ec55f Compare January 31, 2024 11:05
@fabpot
Copy link
Member

fabpot commented Feb 3, 2024

Thank you @nikophil.

@fabpot fabpot merged commit e5d1e1e into symfony:7.1 Feb 3, 2024
7 of 9 checks passed
@fabpot fabpot mentioned this pull request May 2, 2024
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.

None yet

6 participants