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

False positive access violations when accessing non-public parent class members from conditionally-defined subclasses #5639

Closed
gnarlyquack opened this issue Sep 16, 2021 · 2 comments
Labels

Comments

@gnarlyquack
Copy link

Bug report

When there are multiple/duplicate subclass definitions which are conditionally defined, it appears that analysis of class definitions after the initial one gets confused about allowed visibility access. Probably clearest to just look at the code snippet. This was not a problem in previous versions of PHPStan.

Code snippet that reproduces the problem

https://phpstan.org/r/433658a8-90bf-4e5e-b3da-a1203f729946

Expected output

No error

Did PHPStan help you today? Did it make you happy in any way?

@ondrejmirtes
Copy link
Member

Fixed: phpstan/phpstan-src@be27584

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants