-
Notifications
You must be signed in to change notification settings - Fork 539
!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
base: 2.1.x
Are you sure you want to change the base?
Conversation
This pull request has been marked as ready for review. |
throw new \RuntimeException('Absolute URLs are prohibited for the redirectTo parameter.'); | ||
} | ||
|
||
assertType('array{scheme?: string, host?: string, port?: int<0, 65535>, user?: string, pass?: string, path?: string, query?: string, fragment?: string}', $parsedUrl); |
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
91a7c18
to
5105b0b
Compare
Memo for me: add test for the issue-bot report |
closes phpstan/phpstan#13301