Skip to content

URI の正規化の説明とコード例を原文に追従 - #494

Merged
KentarouTakeda merged 1 commit into
php:masterfrom
KentarouTakeda:sync-uri-normalization-snippets
Sep 20, 2026
Merged

KentarouTakeda merged 1 commit into
php:masterfrom
KentarouTakeda:sync-uri-normalization-snippets

Conversation

@KentarouTakeda

@KentarouTakeda KentarouTakeda commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator

php/doc-en@9bf8b904f3 (php/doc-en#5548) に追従します。

  • 正規化される/されないことの説明を language-snippets.ent の 2 つのエンティティに切り出し、各 getter のページから参照するようにしました
  • Uri\WhatWg\Url のコンストラクタで、クラス名を取り違えていた誤りと (e.g. が重複していた誤りを修正しました
  • toRawString() で IPv6 ホストだけが例外的に完全展開・小文字で返ることを追記しました
  • Ipv4InIpv6InvalidCodePoint に発生条件を追加しました
  • Rfc3986\Uri::resolve() の基準をベース URL からベース URI に直しました
  • __unserialize() が受け取るのが data パラメータの配列であることを明記しました
  • IDN を扱うコード例のホスト名を非 ASCII ラベルに差し替えました

対象ファイル (30件)

  • language-snippets.ent
  • reference/uri/uri.whatwg.urlvalidationerrortype.xml
  • reference/uri/uri/rfc3986/uri/ (21) — getfragment, gethost, getpassword, getpath, getquery, getrawfragment, getrawhost, getrawpassword, getrawpath, getrawquery, getrawscheme, getrawuserinfo, getrawusername, getscheme, getuserinfo, getusername, parse, resolve, torawstring, tostring, withfragment
  • reference/uri/uri/whatwg/url/ (7) — construct, getasciihost, parse, resolve, toasciistring, tounicodestring, unserialize

php/doc-en@9bf8b904f3 (php/doc-en#5548) に追従します。

正規化される/されないことの説明が language-snippets.ent の 2 つのエンティティに
切り出され、各 getter のページから参照されるようになりました。あわせて
Uri\WhatWg\Url のコンストラクタと parse() でクラス名と重複した `(e.g.` の誤りを修正し、
Ipv4InIpv6InvalidCodePoint に発生条件の説明を追加し、IDN を扱うコード例のホスト名を
非 ASCII ラベルに差し替えています。

## 対象ファイル (30件)

- language-snippets.ent
- reference/uri/uri.whatwg.urlvalidationerrortype.xml
- reference/uri/uri/rfc3986/uri/ (21) — getfragment, gethost, getpassword, getpath,
  getquery, getrawfragment, getrawhost, getrawpassword, getrawpath, getrawquery,
  getrawscheme, getrawuserinfo, getrawusername, getscheme, getuserinfo, getusername,
  parse, resolve, torawstring, tostring, withfragment
- reference/uri/uri/whatwg/url/ (7) — construct, getasciihost, parse, resolve,
  toasciistring, tounicodestring, unserialize
@KentarouTakeda
KentarouTakeda force-pushed the sync-uri-normalization-snippets branch from 77d4010 to 60cfa0c Compare September 20, 2026 06:54
@KentarouTakeda
KentarouTakeda merged commit 0646885 into php:master Sep 20, 2026
2 checks passed
@KentarouTakeda
KentarouTakeda deleted the sync-uri-normalization-snippets branch September 20, 2026 07:13
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.

1 participant