-
Notifications
You must be signed in to change notification settings - Fork 545
!array_key_exists() should imply array for PHP8+
#4417
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
Conversation
This pull request has been marked as ready for review.
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.
in this case we got more preicse, because we no longer have a union array{...}|false but just the plain array-shape.
but on the other hand we no longer know that the 'host' offset cannot exist at this point.
I tried several variants, but wasn't successfull in combining the specified types in a way which turns the mixed into array while also removing the offset.
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.
I figured it out
e479f0e to
cebec02
Compare
Memo for me: add test for the issue-bot report
Edit: ✅
d96ea64 to
ca292ba
Compare
bab0af7
into
phpstan:2.1.x
Thank you!
Uh oh!
There was an error while loading. Please reload this page.
closes phpstan/phpstan#6209
closes phpstan/phpstan#13301