-
-
Notifications
You must be signed in to change notification settings - Fork 864
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
Using trait with method renaming / visibility change triggers bogus errors for other uses of trait #6264
Comments
Prevent upgrading to phpstan 1.3 due to phpstan/phpstan#6264
This is the exact same issue I encountered with pmmp/PocketMine-MP#4684. Simpler example: https://phpstan.org/r/5402d664-98c7-44ac-80ef-564dfab3a12f |
I should also mention that this appears to corrupt the visibility for future analysed classes using the same trait, for example: The |
Probably related with #6253 , also present since phpstan v1.3. |
Fixed: phpstan/phpstan-src@fc5be6a Root cause: Roave/BetterReflection#942 |
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. |
Bug report
If a trait is used converting a method to private in one class
bogus errrors appear in other classes where the same trait is used
while that method is actually public there.
Code snippet that reproduces the problem
https://phpstan.org/r/78866c94-e900-4e2f-be7d-3f724f817b8d
Expected output
No errors. The problem appeared first in phpstan 1.3
The text was updated successfully, but these errors were encountered: