uri: Fix Uri\WhatWg\Url screens that ignore URL normalization - #5721
Merged
jordikroon merged 1 commit intoAug 7, 2026
Merged
Conversation
KentarouTakeda
force-pushed
the
fix-screens-that-never-matched
branch
from
July 31, 2026 18:16
ff40a1a to
f578447
Compare
A WHATWG URL does not store the port when it is the scheme's default, so getPort() and withPort() both echoed null while their screens claimed 443, and Url::parse() normalizes an empty path to "/", which its screen did not show. The extension is new in PHP 8.5, so these were wrong from the start. Echoing null renders as an empty box, so the two port examples use var_dump() now and also show a port that is kept: the contrast is what makes the normalization legible.
KentarouTakeda
force-pushed
the
fix-screens-that-never-matched
branch
2 times, most recently
from
August 4, 2026 13:28
a3a2b37 to
6f423ad
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Third batch from the audit behind #5718: screens that do not match what their example prints.
Uri\WhatWg\Url::getPort()andwithPort()echoed a port that WHATWG normalization removes, so both printed nothing while the screens claimed 443. They usevar_dump()now, and show a port that survives normalization and one that does not.Url::parse()gains the/that normalization adds to an empty path.Three more screens were here and have been dropped. Two had wrong values that nothing in the examples depends on, and the third is now #5740.
Press Run code on these pages and the output that appears is what this PR puts in the
<screen>: