You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a private method is called with a mismatching case, UnusedPrivateMethodRule will report it as unused, while this is wrong (given PHP treats method names as case insensitive).
Worse is that the case mismatch is only reported by strict rules, so a developer trusting phpstan might remove the method (and then be granted with a missing method error on next run)
Bug report
If a private method is called with a mismatching case, UnusedPrivateMethodRule will report it as unused, while this is wrong (given PHP treats method names as case insensitive).
Worse is that the case mismatch is only reported by strict rules, so a developer trusting phpstan might remove the method (and then be granted with a missing method error on next run)
Code snippet that reproduces the problem
https://phpstan.org/r/738ba792-52e6-4e0e-8ba7-491ebc238488
Expected output
No errors should be removed (unless strict rules are enabled of course) by making UnusedPrivateMethodRule do a case insensitive check.
Did PHPStan help you today? Did it make you happy in any way?
No response
The text was updated successfully, but these errors were encountered: