Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127234 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 779B01A00BC for ; Mon, 28 Apr 2025 21:31:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1745875742; bh=ntCPLZ2vm43sQpuykSkliVo2eIvfTFotX8ujMgG8zzU=; h=References:In-Reply-To:From:Date:Subject:To:From; b=goBAgzRSWOtX6vDv2mCiogefnsnNzXisx1+KYEj4Jauka6kSs0eDe3thUOFP867ad G0dmbXJaAlPGE7jsce73b4/ZrbyDdXmdwQqC5l8YYJB1AAtZQJGrtfrxxAfMSouDWt S12I/jTZ7R0WO8Cyd1iU1v2ZBitWaZZih5EX9M+UgOJMO3A7/py47D1oqHDCs4VTMW AmhOgeEtZcAV42o/dr9goBKPYuVJizdQCLmXRl/rJu+XY5fxCUaTrdw5BdxZXz70OZ IEYC2IXHYBn81d64Zc5ZpUgyZBqR4ECF1EOT0EdYj5ltduIBqzHaszJIsjmUX0bh+H 4qCkmY76hxLmQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id ADC1D18065F for ; Mon, 28 Apr 2025 21:28:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) 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,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) (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 ; Mon, 28 Apr 2025 21:28:57 +0000 (UTC) Received: by mail-pj1-f42.google.com with SMTP id 98e67ed59e1d1-306b78ae2d1so4381366a91.3 for ; Mon, 28 Apr 2025 14:31:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745875874; x=1746480674; 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=Vqz9ShUURN0wrfzMJClLI332gQMtYzNNgthRsH3apjc=; b=P05ZsEOF6Zf2GYj7GuxvvNOYepy68Bd1Qb5bSQbynKqCgkntY5izpvgzGQcVQwLK8A KU4w0Go2g9zzaZflAarxAHKmwNpQc4tq7I5iNAlfAurg7U/LWVvXh3DoKh7sls+wvwHO 1D6bg5xgiHyR9z6QznatXKCkcqE+oRdJRctJ0D+evIFUpko4qQz6eJIoZXD1gdT0tACn KjOR1RBecHRoTxAqDXSZrzSRt+FYuin8MobK9S5Fg0j/Pw3jOCEruhCW2QhwMlpMHDVz 1nv139YPZmbgTv1ch9kTQqZkjXr8zj+9fJl12uwvy7Z2+219P2FxY1CSqB31ebzqrscu mYYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745875874; x=1746480674; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Vqz9ShUURN0wrfzMJClLI332gQMtYzNNgthRsH3apjc=; b=lE9038t+iz4Nx0vePdQQ882V9D2Rso5YWl1SOSMC4wCBdJz1ZoLExF5tnvkicx3JX7 9+VFZDnmfE981tbc4+FCtfOysn+DAygeRbmHG800+jOc77HTnRrdsj3X8xe4qiOmQ+lh G4pOSxCMwTKQea6i6KCbJ2T4bfQMGQ0aPm1m0izgfoekq79DQ38M6TnoKhkpMIZK/syF ocRWxOW5hzIqhqgM9Jj6nq8yYsxYaeIWJvZ/UhLCEmIS0w5OhvCiFyUOpEpqsebGQf4b r8cKILPs4xBw37Htfe+l1MAM4c1odUY0LEdhXN697O1x068J1px7d1CKDwPMT2XpY2eu VSIQ== X-Forwarded-Encrypted: i=1; AJvYcCUFDGXWyhkMYuRLV5qnl0rUwa401WBZVmC7VB503jBk1aBJLeD7jkfD2aaAMViJX3yYG53UPXpesFE=@lists.php.net X-Gm-Message-State: AOJu0Yw1tw6je+rcSdKrFXDeWI017BMO87EQPo4joyNybz3DvGvLr0Hp yu6szI5nAqRRq1ERUsgjTk/V39fqx1E/mUti0gsEECo+sUp7nHMHX6ahc77IRlBCmfb6rOrG8L/ XU79WoMbb+TXcbv0wgkuBFr6FX9AXL4Gl X-Gm-Gg: ASbGncsdNrvK4k4xWyHy3sKYDN6CKqpu/V5dBBYR/Xs2XpGN+WFmzQqBN0jIgM8TsD/ WH4sF3RS435T5h3/k7ifKCIFQYbmKS6vWvXNT1dKl0eLNBsJfPJCqpXst4nCGisYdYOiuV/DhcT dRAxw+FGPGncTif1NfQ8R1oYuIvasHwXTPF+ea+M1cJRuYhVCmcfRoVq9k X-Google-Smtp-Source: AGHT+IFZeehwRRk/b0jWjC5gZXr+CIBZ5hIuM8AM/pBNI79SeR/2/bVGno9EbxdneblLnOBGnZBXNC9ngPW7UdFsDiw= X-Received: by 2002:a17:90b:2f10:b0:2fa:1e3e:9be5 with SMTP id 98e67ed59e1d1-30a0102977fmr17265689a91.0.1745875873810; Mon, 28 Apr 2025 14:31:13 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <1BCB4144-231D-45EA-A914-98EE8F0F503A@automattic.com> <8E614C9C-BA85-45D8-9A4E-A30D69981C5D@automattic.com> <8df04e01-deac-404b-beb7-cd982423db63@bastelstu.be> <33427cd03035ef084245c44290b56a55@bastelstu.be> <0aa1eefc3941bdea0092e935074daa58@bastelstu.be> <76d96ea8a78c6025128c0a4b01c94c0a@bastelstu.be> <07a8a580-4f0c-4b2f-8a67-b91dacfe99bf@bastelstu.be> In-Reply-To: Date: Mon, 28 Apr 2025 23:31:02 +0200 X-Gm-Features: ATxdqUH5yMhN5otiHUWiwan67WfvUld0BlfFbFW2mrlUk7ApZjcyXmSRshnNjdE Message-ID: Subject: Re: [PHP-DEV] [RFC] [Discussion] Add WHATWG compliant URL parsing API To: =?UTF-8?B?TcOhdMOpIEtvY3Npcw==?= , PHP Internals List , =?UTF-8?Q?Tim_D=C3=BCsterhus?= Content-Type: multipart/alternative; boundary="00000000000047cec10633dd6709" From: nyamsprod@gmail.com (ignace nyamagana butera) --00000000000047cec10633dd6709 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Mat=C3=A9, > I fiddled a little bit with the implementation, and I went with the Uri\UriComparisonMode enum name at last. I hope that it is OK on your side. If no one objects with your name choice I am fine with it, as long as it is not a boolean :) I will adapt my polyfill. I think I have no more remarks from my side of things, great job! Since I do not have the right to vote I hope this one will pass when time for voting comes! On Mon, Apr 28, 2025 at 11:21=E2=80=AFPM M=C3=A1t=C3=A9 Kocsis wrote: > Hi Ignace, > > The $excludeFragment is `true` by default so in the example it should be >> `false` instead. Perhaps using an Enum instead would make the >> DX easier than using a boolean ? >> I believe the same issue is in all examples regarding the use of that >> parameter. >> > > You are right, I completely messed up the value of the $excludeFragment > variables in the examples. After having thought about your suggestion, I'= m > fine with adding the enum. > It's a bit verbose indeed, but at least it properly conveys the meaning o= f > the parameter, so hopefully it will reduce the number of WTFs when people > start to use the new API. :) > > I fiddled a little bit with the implementation, and I went with the > Uri\UriComparisonMode enum name at last. I hope that it is OK on your sid= e. > > Regards, > M=C3=A1t=C3=A9 > --00000000000047cec10633dd6709 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Mat=C3=A9,

> I fiddled= a little bit with the implementation, and I went with the Uri\UriCompariso= nMode enum name at last. I hope that it=C2=A0is OK on=C2=A0your side.
=

If no one objects with your name choice I am fine with it, a= s long as it is not a boolean :)=C2=A0 I will adapt my polyfill. I think I = have no more remarks=C2=A0from my side of things, great job! Since I do not= have=C2=A0 the right to vote I hope this one will pass when time for votin= g comes!

On Mon, Apr 28, 2025 at 11:21=E2=80=AFPM M=C3= =A1t=C3=A9 Kocsis <kocsismate9= 0@gmail.com> wrote:
Hi Ignace,

The $excludeFragment is `true` by default so in the exa= mple it should be `false` instead. Perhaps using an Enum instead would make= the DX=C2=A0easier=C2=A0than using a boolean ?
I believe the same issu= e is in all examples regarding the use of that parameter.

You are=C2=A0right, I completely messed up the v= alue of the $excludeFragment variables in the examples. After having though= t=C2=A0about your suggestion, I'm fine with adding the enum.
= It's a bit verbose indeed, but at least it properly conveys the meaning= of the parameter, so hopefully it will reduce the number of WTFs when peop= le start to use the new API. :)

I fiddled a little= bit with the implementation, and I went with the Uri\UriComparisonMode enu= m name at last. I hope that it=C2=A0is OK on=C2=A0your side.

=
Regards,
M=C3=A1t=C3=A9
--00000000000047cec10633dd6709--