Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129501 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 00EE81A00BC for ; Tue, 2 Dec 2025 06:49:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1764658168; bh=wOP9oIgtgH4f0QVREZFQ2+Kq6oKfYvG5cvZJPTtBmms=; h=References:In-Reply-To:From:Date:Subject:To:From; b=H5ljbzjbO7LZpLrslGKjdiE0NZ1quGxt5agHrIoAAotcfRkxyeB0QfyvJq/1WNpYl g+lFIXG9l38SaKAv+0dvRBOo1t+EGMnOtFS1dw029/SswZ+4qphECumkjS8XlMea3T kRmu/kZV/6m9eMiXIqirglT0QdTBFW8t1rDo5VWeEQ1OD+xiySXswLNvtfTt3MNMrd Gdg/I4MGGMWCi5m6exraGzY6eh6fBQX+V6uJKbQJs+5VzqpeyN9gIGB9CIelYsoN9H 67u8pxlVe6NYBcLYWyVA2xWQDegpFj1tQ4DzMbsm/e6rg9Z5Arm/2HS1nq+4JU/H0x p/Zc22HlOH8jA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 46840180056 for ; Tue, 2 Dec 2025 06:49:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,T_SPF_TEMPERROR autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-oo1-f46.google.com (mail-oo1-f46.google.com [209.85.161.46]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 2 Dec 2025 06:49:23 +0000 (UTC) Received: by mail-oo1-f46.google.com with SMTP id 006d021491bc7-657c68a08a7so1845479eaf.1 for ; Mon, 01 Dec 2025 22:49:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764658158; x=1765262958; darn=lists.php.net; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=crREERlIzjGWc8Jn4l5lVGxIhzREXCGHRG0fELXHJRw=; b=jhla9Swh4lZIZFasM6BIH+Rj8d/fglVi0o4QA2ihcPXOvj6L/EWv1pNhMdq3liNM7H 0XB9CHOsP07V0mYh6/PxIMXd+bBliKY5cBregCVScwNwUJSNbl7eqk0HbjD+9TVkSyuy wr8MjPkDJriilb+xviM6MTHXmCWCl4tSB9o4ZUbMdr9FspmS3+ZbFk0iaZj1Q0M9LvuA aRsqslwqPbZabN3g2HIh2mbpoQ/6LT2TlCgN/bTwZ5FeSyej0jQ5o9KHyRPQdPWA4/9l yKlqBnkdmKkGZquZ7MP7bu+d7VMt3nE3R0zfY/3ADBeoSAR5nuI/FMZEefiKf7BI0uIi aQiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764658158; x=1765262958; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=crREERlIzjGWc8Jn4l5lVGxIhzREXCGHRG0fELXHJRw=; b=mv93HhNM2bPgz5GkzVh7wkfF7XiiB0x6WjwRbn8wY7/FKIP8L3f/G2nBANLKaohNJj gtdmIGKiV5FUZBCX7VvF6MruuUyhk4yni4BV2KcwriX8M3G/mCZ8dZhFavdwlKrZIvUY oL5xvwgDQCN9D3REaH2+bdR2Lcoi/z/9lrVJLUtZcKzMzymf3e5l3Y6QUlbM/Y1FDpUa zxGVtluYfCzWgCWKw+IO9O6WzbgQ+nPcxEU2s7f4b4vIrJacL3OdjLhooBokr4QnnMkV z4zHEecz0fTQQIlCuecCDt8ct/M7KpAh53070XmskjstYTZN4d5cFkHenn07ow0PytZ+ sSCw== X-Forwarded-Encrypted: i=1; AJvYcCV6v+lj9xG9U+eohQEMoJbDuzJZZLQ/9PPMMjyk7/MOpaHmHrPU6eN6ow9yrO33uS6QPtJ1XVbABcc=@lists.php.net X-Gm-Message-State: AOJu0Yx8/auN5zG1vsFfF5/YKaXvAoAIHRFY/ljT2dnKgKENitE0ImpN aceEbxxeW2AogtCgRVACfIUXdigdHwUd3WPaIWjZJpTaQ6bTo2DccQJx2ROGvEKcBWFS0bddhqX PloLo5Q9tArt6ebHKNjBoYfcNcjvk2Vs= X-Gm-Gg: ASbGncsKhXpu0Vc5HgGIstO+l7Wm+vU8QgWiqlboI2jQG1W9caGI68AmT2aqP3O4Y/Q bEq7YVkWDeJg802zZVxUk80pFIRkGOY1WM8r0KFGskbm8t0LoZphEjdAoro7nk61YQAX0PtN0N1 +auHaCz3PBbqPnVPKaTyvcPSzQaSv3hgCJf21qfqvjUCeicE5ppllRYRYjzUQzF9REixWUnfsAj CmRi+BkSHqVYAyrc8tAzV3yKGLU65CGGjSEeUEfmYq3RbQu5iPXjMCUPd9Jl09vzKvNqJNO X-Google-Smtp-Source: AGHT+IG7auppKdpZAs8mcLOUqk/mPzI0PZ0JNR/J4nLrMelkH+5AbiGiVc0F9Yz67+l8m4jsP3k7j95gA+zwVhmso0k= X-Received: by 2002:a05:6808:4fcb:b0:43f:b6de:8152 with SMTP id 5614622812f47-45112bba243mr17804347b6e.40.1764658157907; Mon, 01 Dec 2025 22:49:17 -0800 (PST) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 2 Dec 2025 07:49:05 +0100 X-Gm-Features: AWmQ_bmoDetVvXvMd_5BsE4YpIeAP-oDISRRioZnIKQx28NQjdkRLWPCAR0VZzE Message-ID: Subject: Re: [PHP-DEV] [RFC] [Discussion] Followup Improvements for ext/uri To: =?UTF-8?B?TcOhdMOpIEtvY3Npcw==?= , PHP Internals List Content-Type: multipart/alternative; boundary="000000000000a6f4650644f27ecd" From: nyamsprod@gmail.com (ignace nyamagana butera) --000000000000a6f4650644f27ecd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi M=C3=A1t=C3=A9, After quickly checking the proposed API for Percent-Encoding and Decoding Support I wonder if the following would not be more appropriate ? ```php namespace Uri\Rfc3986 { enum UriPercentEncoding { case UserInfo; case Host; case RelativeReferencePath; case RelativeReferenceFirstPathSegment; case Path; case PathSegment; case Query; case FormQuery; case Fragment; case AllReservedCharacters; case All; public function encode(string $input): string {} public function decode(string $input): string {} } } ``` With the same logic being applied in the `Uri\Whatwg` namespace. This would make for a better encapsulated feature. So we can have a clear distinction between the Value Object, its builder and the Encoding mechanism ? What do you think? Best regards, Ignace On Mon, Dec 1, 2025 at 9:53=E2=80=AFPM M=C3=A1t=C3=A9 Kocsis wrote: > Hi Everyone, > > I'd like to introduce my latest RFC that I've been working on for a while > now: https://wiki.php.net/rfc/uri_followup. > > It proposes 5 followup improvements for ext/uri in the following areas: > - URI Building > - Query Parameter Manipulation > - Accessing Path Segments as an Array > - Host Type Detection > - URI Type Detection > - Percent-Encoding and Decoding Support > > I did my best to write an RFC that was at least as extensive as > https://wiki.php.net/rfc/url_parsing_api had become by the end. Despite > my efforts, > there are still a couple things which need a final decision, or which > need to be polished/improved. Some examples: > > - How to support array/object values for constructing query strings? ( > https://wiki.php.net/rfc/uri_followup#type_support) > - How to make the UriQueryParams and UrlQueryParams classes more > interoperable with the query string component (mainly with respect to > percent-encoding)? ( > https://wiki.php.net/rfc/uri_followup#percent-encoding_and_decoding) > - Exactly how the advanced percent-decoding capabilities should work? Doe= s > it make sense to support all the possible modes (UriPercentEncodingMode) > for percent-decoding as well ( > https://wiki.php.net/rfc/uri_followup#percent-encoding_and_decoding_suppo= rt > ) > - etc. > > Regards, > M=C3=A1t=C3=A9 > --000000000000a6f4650644f27ecd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi M=C3=A1t=C3=A9,
After quickly checking the proposed= API for Percent-Encoding and Decoding Support I wonder if the following wo= uld not=C2=A0
be more appropriate ?
Wit=
h the same logic being applied in the `Uri\Whatwg` namespace. This would ma=
ke for a better encapsulated feature. So we can
have a clear distinction between the Valu=
e Object, its builder and the Encoding mechanism ? What do you think?
Best regards,
Ignace
=

On Mon, Dec 1, 2025 at 9:53=E2=80=AFPM M= =C3=A1t=C3=A9 Kocsis <kocsisma= te90@gmail.com> wrote:
Hi Everyone,

I'd like= to introduce my latest RFC that I've been working on for a while now: = https:/= /wiki.php.net/rfc/uri_followup.

It proposes 5= =C2=A0followup=C2=A0improvements for ext/uri in the following areas:
<= div>- URI Building
- Query Parameter Manipulation
- Accessing Path Se= gments as an Array
- Host Type Detection
- URI Type Detection
- Pe= rcent-Encoding and Decoding Support

I did my best = to write an RFC that was at least as extensive as=C2=A0https://wiki.php.net/rfc= /url_parsing_api had become by the end. Despite my efforts,
t= here are still a couple things which need=C2=A0a final decision, or which n= eed=C2=A0to be polished/improved. Some examples:

-= How to support array/object values for constructing query strings? (= https://wiki.php.net/rfc/uri_followup#type_support)
- How to = make the UriQueryParams and=C2=A0UrlQueryParams classes more interoperable = with the query string component (mainly with respect to percent-encoding)? = (https://wiki.php.net/rfc/uri_followup#percent-encod= ing_and_decoding)
- Exactly how the advanced percent-decoding= capabilities should work? Does it make sense to support all the possible m= odes (UriPercentEncodingMode) for percent-decoding as well (https://wiki.php.net/rfc/uri_followup#percent-encoding_and_= decoding_support)
- etc.

Regards,
M=C3=A1t=C3=A9
--000000000000a6f4650644f27ecd--