Skip to content

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Oct 7, 2025

@staabm staabm marked this pull request as ready for review October 7, 2025 08:06
@phpstan-bot
Copy link
Collaborator

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);
Copy link
Contributor Author

@staabm staabm Oct 7, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

!array_key_exists() should imply array for PHP8+
2 participants