Skip to content

Describe the errors Uri\WhatWg\Url writes by reference - #7134

Open
spaze wants to merge 1 commit into
phpstan:2.3.xfrom
spaze:spaze/whatwg-url-param-out-type
Open

spaze wants to merge 1 commit into
phpstan:2.3.xfrom
spaze:spaze/whatwg-url-param-out-type

Conversation

@spaze

@spaze spaze commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Url::parse(), new Url() and Url::resolve() always write a list of UrlValidationError there, but without an out type the variable was mixed after the call, so reading it needed is_array() and instanceof checks.

`Url::parse()`, `new Url()` and `Url::resolve()` always write a list of `UrlValidationError` there, but without an out type the variable was `mixed` after the call, so reading it needed `is_array()` and `instanceof` checks.
@staabm

staabm commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Can these type additions be contributed to php-src directly?

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.

2 participants