From 9c2b85d0fe0fc082c29c7dff39f013186ab1c699 Mon Sep 17 00:00:00 2001 From: lacatoire Date: Mon, 31 Aug 2026 13:38:24 +0200 Subject: [PATCH] uri: fix the Uri\WhatWg\Url screens that ignored URL normalization --- reference/uri/uri/whatwg/url/getport.xml | 12 ++++++++---- reference/uri/uri/whatwg/url/parse.xml | 4 ++-- reference/uri/uri/whatwg/url/withport.xml | 11 ++++++++--- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/reference/uri/uri/whatwg/url/getport.xml b/reference/uri/uri/whatwg/url/getport.xml index af2d04f190..767632a711 100644 --- a/reference/uri/uri/whatwg/url/getport.xml +++ b/reference/uri/uri/whatwg/url/getport.xml @@ -1,5 +1,5 @@ - + Uri\WhatWg\Url::getPort @@ -37,15 +37,19 @@ getPort()); -echo $url->getPort(); +// 443 — стандартный порт для схемы https, поэтому он не сохраняется. +$url = new \Uri\WhatWg\Url("https://example.com:443"); +var_dump($url->getPort()); ]]> &example.outputs; diff --git a/reference/uri/uri/whatwg/url/parse.xml b/reference/uri/uri/whatwg/url/parse.xml index ed8314319d..063421226b 100644 --- a/reference/uri/uri/whatwg/url/parse.xml +++ b/reference/uri/uri/whatwg/url/parse.xml @@ -1,5 +1,5 @@ - + @@ -82,7 +82,7 @@ if ($url !== null) { &example.outputs; diff --git a/reference/uri/uri/whatwg/url/withport.xml b/reference/uri/uri/whatwg/url/withport.xml index ef8fc40ccb..7e776ba8da 100644 --- a/reference/uri/uri/whatwg/url/withport.xml +++ b/reference/uri/uri/whatwg/url/withport.xml @@ -1,5 +1,5 @@ - + Uri\WhatWg\Url::withPort @@ -52,15 +52,20 @@ withPort(443); +var_dump($url->getPort()); -echo $url->getPort(); +$url = $url->withPort(8443); +var_dump($url->getPort()); ]]> &example.outputs;