-
Notifications
You must be signed in to change notification settings - Fork 546
Fix strtr inferences #4466
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
base: 2.1.x
Are you sure you want to change the base?
Fix strtr inferences #4466
Conversation
49607b6 to
93b42a2
Compare
93b42a2 to
6dbf9e4
Compare
|
Escaped mutants here. This means tests need to be written so that when the code changes like that, there will be some tests that will fail. Possibly the code logic might be wrong too. |
I'm not sure what should be expected here. The mutant can only occurs if we pass Also if I try to support "maybe array" with something like I'll still get "false positive" escaped mutant because now |
|
Maybe array is also for example
Type inference and error reporting are two independent different parts of PHPStan. Type inference should still do something sensible even if the user passes a wrong type there. Especially when the wrong type might not even be reported on a lower rule level. |
6a6e148 to
84f0514
Compare
|
No mutant escaped now @ondrejmirtes :) The lint 8.0 failure seems unrelated/random |
I also rebased and fixed all my existing PR if you have time for a look https://github.com/phpstan/phpstan-src/pulls/VincentLanglet. |
Closes phpstan/phpstan#13708