Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130220 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 0623A1A00BC for ; Sun, 1 Mar 2026 23:14:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1772406869; bh=9ypyHY84tigFYa/stb7kFkEnpiT3K1U1Rz2ssaUfErE=; h=Date:From:To:In-Reply-To:References:Subject:From; b=D9rR+Fn2nuAZrAwtsCo07wtcsFaRPCN3kI8nsiy9q/lJat4ZRtnVa4eeENnEVWI5X KxKt7cmsB5xHzHIsLnD0Hz0Jsy10RFNXlq1b3yPRmQqqyQR2PDiqqVjWKtTEtDdV8G m8uafy1uyWNfd/Uh9bZVpKoaz9O3FpkrZC9p8I+I0DiypviCl/VFM2amifTK6NKuqF E58pRkz6Khl2W1W85JzC9qu3WYImnRyTKEL1BNq+hQeKbqLNy5PSRQhwvDJJ7433M1 I+iusK18S5O+c2lS1kNuSIeF/5XafPsf3XlMv3GK7xIT1D3jM9dFevGvPzoHWmbPED M4TyHpbMManjw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A809B180688 for ; Sun, 1 Mar 2026 23:14:28 +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,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from outbound.qs.icloud.com (qs-2005a-snip4-3.eps.apple.com [57.103.86.134]) (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 ; Sun, 1 Mar 2026 23:14:28 +0000 (UTC) Received: from outbound.qs.icloud.com (unknown [127.0.0.2]) by p00-icloudmta-asmtp-us-east-2d-60-percent-10 (Postfix) with ESMTPS id B26B718000AD; Sun, 1 Mar 2026 23:14:20 +0000 (UTC) Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai; t=1772406862; x=1774998862; bh=9ypyHY84tigFYa/stb7kFkEnpiT3K1U1Rz2ssaUfErE=; h=Date:From:To:Message-ID:Subject:MIME-Version:Content-Type:x-icloud-hme; b=WAprboDUmQ60712Q+unEinIKCqUbYfq5DBbyhKCtSUyzwQuQpzenXhMmvGZv87CHfF23hYbaHFoTHrCX34abJosuhAWG4MY+Hmaa9oA66ffVl3kNcvz5ZXRU5kNJbDS5Ick90dBLn1ttGUH7AHGJ5kUnFeENYo+il/SB2oo75Mo6Ezb70VeukWzoKL93aremQtiakuXhOy8DaqRl5a0/MjTjFw7f8vBDK21QHNCZqXccVlNRw90b228TPeG24e2ju/4oV6aRUNILNI3kFBSWiTAepVIqfYdhAS6Nh6jqsi06upovAtIfAxEbsafDqRJ8RIM6zTalb+rvGNp10M5xmg== Received: from [192.168.1.170] (unknown [17.57.155.37]) by p00-icloudmta-asmtp-us-east-2d-60-percent-10 (Postfix) with ESMTPSA id 6E265180038C; Sun, 1 Mar 2026 23:14:19 +0000 (UTC) Date: Mon, 2 Mar 2026 00:14:11 +0100 To: PHP Internals List , =?utf-8?Q?M=C3=A1t=C3=A9_Kocsis?= Message-ID: In-Reply-To: References: Subject: Re: [PHP-DEV] [RFC] [Discussion] Query Parameter Manipulation Support X-Readdle-Message-ID: d5e67274-aef8-445f-9116-3eed2a36f78e@Spark Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="69a4c848_78437e35_2aa" X-Proofpoint-ORIG-GUID: NyysNhgjQ9UUbgC6cCcEeVOS47on4sYf X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzAxMDIxMyBTYWx0ZWRfX+bzM01ms3ZJ6 lajmFp12PkiNka8oNpbb0ttktSIlHM9o0Lb/0TjAQMwR4sEPazTZMeQ2cDnCqndovHKxJe+taCp qLwsstM0/5Wir9ACgsYL3zzxpy8L+EecD4tgIctk2E681If3vCZtF4aI+Eafv+ImZuzdFN0vqvw U4blBCtBfo5RnPKyZASp0RL6YoaatkP3uF6AM1Wy5ytvhG7L3S7bKgxEtTVTvQaG/mveNxRTwAU UKp7ITHQjvSk3KEXySVFy6shhYRQN7nCDqA7LHFm9vfZUyfHC4ynSzViB8htrLIPKCm+ptzBN6D lhtd5yEZA1kxxZhxc+H4G95aSddAUdVhLsLAtxWnM+4zVG5sL2brKicWTh6wHM= X-Authority-Info-Out: v=2.4 cv=bM8b4f+Z c=1 sm=1 tr=0 ts=69a4c84d cx=c_apl:c_apl_out:c_pps a=bsP7O+dXZ5uKcj+dsLqiMw==:117 a=bsP7O+dXZ5uKcj+dsLqiMw==:17 a=Yq5XynenixoA:10 a=x7bEGLp0ZPQA:10 a=xKl34KcbpAAA:10 a=VkNPw1HP01LnGYTKEx00:22 a=Mpw57Om8IfrbqaoTuvik:22 a=GgsMoib0sEa3-_RKJdDe:22 a=T21SbIa3AAAA:8 a=67BIL_jfAAAA:8 a=pGLkceISAAAA:8 a=uq5I0wNCgZZveTOCA0QA:9 a=QEXdDO2ut3YA:10 a=SSmOFEACAAAA:8 a=liYpAiXhwuUjF5f_JBYA:9 a=YnOVAQrL7eRjPnr0:21 a=_W_S_7VecoQA:10 a=SnCPDuWYnhHfdy9Ed-Bx:22 X-Proofpoint-GUID: NyysNhgjQ9UUbgC6cCcEeVOS47on4sYf X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-01_05,2026-02-27_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 phishscore=0 adultscore=0 lowpriorityscore=0 mlxscore=0 suspectscore=0 clxscore=1011 mlxlogscore=999 spamscore=0 malwarescore=0 classifier=spam authscore=0 adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2603010213 X-JNJ: AAAAAAAB1vMsdtCSybulqDQTRHh/S1eqNVIcewGgctFqdp12OhSlIJPUOPxbDIVZ531hAB0smnzmgVDGmLmyeVyhG7utVZXI0rS0VJl1qOH5nqrCsizAtArsUqBq6I2lcI0Eoo5o2zn5eNFpV/EK1+koxuleJQpfO++PVgEjHNPo32Q8Me8HSYlJU3piVi9GU2qGN1AH25K2M2A25Vp49HmT4rc+cPImHztboC98RG86N1OpMKylFuYkW1N1RHkZygwiBHAk4hWOqA58qQTuz/GIhzl/T/tJJBcdkQKAZb1aSqvbJf7jepzNCWKA7kvuxRzbJI5vpwXmanTtiqWMC1fjZ9TFNOsVct1fF5VvPibH4iIAr8KV7dM4iptHVE1STUZve3JhNc6eZ7DvQ8EbBjQJiIq/exiNFNK0lTQMghk/dTNZbPNmpJM9t7RCH9Ed+DkCBqkioILBMdS/p3rU8xYanH7JWyWMBek45ZZAyWDnauKUv/o+n/Td7yFQ9ZhY04h6NWWvY2TwSCUIWlWJUR3H3e+ZN/eZqe8NEdRPsteScALSD3cEICnFQ6412HaIxrO2P8YV5mEVNSwKs1YzCC1ZGj4fOU3fiHZk0fBSHeFWFG43Vt+vqGoizWGaUCbKN+xxdfmpmoVSbzvf8YK9spC5OQ== From: jordikroon@me.com (Jordi Kroon) --69a4c848_78437e35_2aa Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hey M=C3=A1t=C3=A9, Nice work, I really appreciate the effort=21 While adopting Uri I stumble= d upon this missing feature as well. In the examples you mention the usage of =60parse=60 and =60toString=60. = I assume there is no =E2=80=9Cdefault=E2=80=9D and this is a placeholder = for one of the given implementations. But it=E2=80=99s perhaps better to = pick one of for the examples as it suggests it would also exist. When it comes to the implementation I believe it would be nice to also ha= ve a =60getKeys()=60 method. That would only return the keys. You do mention the focus is to move away from =24=5FGET. I like the idea,= but implementing QueryString would still require something like the foll= owing: Uri=5CQueryParams::fromArray(=24=5FGET); If we really want to make =60=24=5FGET=60 obsolete, wouldn=E2=80=99t it b= e nice to have a =60fromRequest()=60 which would directly parse =60=24=5F= GET=60 or use =60=24=5FSERVER=5B=22QUERY=5FSTRING=E2=80=9D=5D=60. As for whether or not this should be a readonly class. I think it should = be. The class itself is following various specs. And since all other clas= ses in the same namespace are also readonly, it should follow the same pr= inciple (also for consistency) I believe. Regards, Jordi On 1 Mar 2026 at 11:32=E2=80=AFPM +0100, M=C3=A1t=C3=A9 Kocsis , wrote: > Hey Everyone, > > As I mentioned in a previous email of mine (https://externals.io/messag= e/129486=23130077), > I recently separated the query parameter handling sub-proposal from=C2=A0= https://wiki.php.net/rfc/uri=5Ffollowup into its own R=46C because it was= way too complex. > Therefore I'm officially opening its discussion. > > After the separation, I reworked the proposal quite a lot: the single b= iggest change > is that now, only a single class would be added: Uri=5CQueryParams inst= ead of both an R=46C 3986 > and a WHATWG URL compatible implementation. > > The focus of the R=46C is now to move away from the usage of the =24=5F= GET superglobal, > which goal comes with two additional expectations: > - the new implementation should have comparable performance to =24=5FGE= T > - the new implementation should support most capabilities of =24=5FGET = (e.g. arrays) > > The first one is probably straightforward to achieve, the latter one ha= s fundamental > problems: PHP's feature set (mostly: array support) is not compatible w= ith the WHATWG URL, > so some behavior likely wouldn't comply with this specification. That's= why the R=46C > still has some TBD parts (e.g. Array API), or some contradicting info r= elated to some getters' and setters'=C2=A0signature/behavior. > > Other than the=C2=A0API itself, the proposal doesn't have many question= s, except one thing: whether the new class should be readonly or not=3F I= tend to make it readonly, but I'm still not sure (since > this class can be used as a Builder). > > Regards, > M=C3=A1t=C3=A9 > > --69a4c848_78437e35_2aa Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Hey M=C3=A1t=C3=A9,

Nice work, I really appreciate the effort=21 While adopting Uri I stumble= d upon this missing feature as well.


In the examples you mention the usage of =60parse=60 and =60toString=60. = I assume there is no =E2=80=9Cdefault=E2=80=9D and this is a placeholder = for one of the given implementations. But it=E2=80=99s perhaps better to = pick one of for the examples as it suggests it would also exist.&=23160;<= br />

When it comes to the implementation I believe it would be nice to also ha= ve a =60getKeys()=60 method. That would only return the keys.

You do mention the focus is to move away from =24=5FGET. I like the idea,= but implementing QueryString would still require something like the foll= owing:
Uri=5CQueryParams::fromArray(=24=5FGET);
If we really want to make =60=24=5FGET=60 obsolete,= wouldn=E2=80=99t it be nice to have a =60fromRequest()=60 which would di= rectly parse =60=24=5FGET=60 or use =60=24=5FSERVER=5B=22QUERY=5FSTRING=E2= =80=9D=5D=60.&=23160;

As for whether or not this should be a readonly class. I think it should = be. The class itself is following various specs. And since all other clas= ses in the same namespace are also readonly, it should follow the same pr= inciple (also for consistency) I believe.

Regards,
Jordi
On 1 Mar 2026 at 11:32=E2=80=AFPM += 0100, M=C3=A1t=C3=A9 Kocsis <kocsismate90=40gmail.com>, wrote:
Hey Everyone,

As I mentioned in a previous email of mine (https://externals.io/message/129486=23= 130077),
I recently separated the query parameter handling sub-proposal from&= =23160;https://wi= ki.php.net/rfc/uri=5Ffollowup into its own R=46C because it was way t= oo complex.
Therefore I'm officially opening its discussion.

After the separation, I reworked the proposal quite a lot: the singl= e biggest change
is that now, only a single class would be added: Uri=5CQueryParams i= nstead of both an R=46C 3986
and a WHATWG URL compatible implementation.

The focus of the R=46C is now to move away from the usage of the =24= =5FGET superglobal,
which goal comes with two additional expectations:
- the new implementation should have comparable performance to =24=5F= GET
- the new implementation should support most capabilities of =24=5FG= ET (e.g. arrays)

The first one is probably straightforward to achieve, the latter one= has fundamental
problems: PHP's feature set (mostly: array support) is not compatibl= e with the WHATWG URL,
so some behavior likely wouldn't comply with this specification. Tha= t's why the R=46C
still has some TBD parts (e.g. Array API), or some contradicting inf= o related to some getters' and setters'&=23160;signature/behavior.

Other than the&=23160;API itself, the proposal doesn't have many que= stions, except one thing: whether the new class should be readonly or not= =3F I tend to make it readonly, but I'm still not sure (since
this class can be used as a Builder).

Regards,
M=C3=A1t=C3=A9


--69a4c848_78437e35_2aa--