-
Notifications
You must be signed in to change notification settings - Fork 532
Introduce reportArrayKeyCast parameter #4012
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?
Conversation
f56eb92
to
011505b
Compare
011505b
to
154bb87
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also would be nice if it observed rule levels. Always wrong type like null
to be always reported, but a partially wrong type like string|stdClass
only on level 7+...
This is achieved with RuleLevelHelper::findTypeToCheck.
692ddc0
to
a5aea3c
Compare
Seems like the So I fixed it and added tests with and without the reportArrayKeyCast option. |
a5aea3c
to
ef97675
Compare
Current status, waiting #4166 first |
627be15
to
4476b7a
Compare
This pull request has been marked as ready for review. |
This is finally ready to be reviewed @ondrejmirtes :) |
Closes phpstan/phpstan#12589
Closes phpstan/phpstan#7884
Closes phpstan/phpstan#7864
Naming is opened to discussion.
I think we could enable this in phpstan-strict-rules.