Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127134 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 qa.php.net (Postfix) with ESMTPS id A51A21A00BC for ; Thu, 17 Apr 2025 11:50:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1744890476; bh=UXQXMh/M0bAcKXFnAx3Ptxx5VFhBIkWiaON9ah3+ybQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=W7N770dDuy8B6UF9djnx1VQ7zPpbtUyHop4D0okDHeDKVv4UmyCtXL97Zv9XKTgCP H7iuQm0LzNCjuR3GVB5Z6mMi1yvK58/blAY1PqhqSlQcdE2ze73Dnk3+gtGmct6iR9 Op1WY/5WZRiYvT15hOrs+W/kFMjfxALihqx3K+PYJRArI01pmAHkkqTYhNM5hB6IaO cQYctFnLC4HF04D4kMFUi6g3zY9pqiyZSIt1Y2vynOQ0meTv5tq8aikiZ1xbSIVLz5 FvJONMHPXtOGlFgraKhtSFfj38PFZUVC3np6V2N5SjN1vhm53XAKrk7ZF6KnQwSLFc AtvoN5c2kufBw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 311A0180052 for ; Thu, 17 Apr 2025 11:47:56 +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.2 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) (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 ; Thu, 17 Apr 2025 11:47:45 +0000 (UTC) Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-7376dd56f8fso804610b3a.2 for ; Thu, 17 Apr 2025 04:50:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744890606; x=1745495406; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=iVC6aczUQ5GAtat9nIZi66HHCQ7tUWjXIBz+7GfiY34=; b=ZFc2t5FnDT1jAIestDgH+kJPXul0NJJb701LOWrr4Cvq9/iw82H/C99jWpWWZ3LGbe qb94gMX8FaH7JMq2cGW7+Y7KstK0HCnlgmDdXXSEdYIH/WD/s9S0jd/e/INs84R4fgzG 2e2TOSzUmKZKQmdowDqyrfAfbYytXtXSSRMXUp64kuBun43nEUgL9jddiejWudBwzv5Y zfk4eGV7vWIZlk4yJCdHtkG551wh1IzDk3gFNMHT2pxdWIn9DUefIrYBtj2l+5CZSA5M v0P5IklHhIHLnoFs96okiNhJ0vAf9FAvypOYrY6WQmHH/dWh4v9wlCVBmApI1k+DEFzv 0fZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744890606; x=1745495406; h=cc: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=iVC6aczUQ5GAtat9nIZi66HHCQ7tUWjXIBz+7GfiY34=; b=oHzJZfwQzaS0Vno+iwJGtX4v/PkdVJ+G27xBWzNb+uur+pzv4lDqcTAgdKttKHjD98 jpS/VbgJ5kz8aP4NSFXuUph0Jb7lBdY0QVA81DTyguZOVg2BdiCNNoiQ3aW1JsgqTglG Tgg/cuh+I5AoE5k+lLfrPFqf0Zai+NNpM2YsItexErN9AZLK7GO+gVB6xyN98UMf04cF TUZc+juPRZ2E8K3bp0tht43v6mpV+uipFT+cQvNQvwWPNo3VcFpxBXz8iy0ENLUtEmss adds6QiE2Xx+/Dte0NgVefSiUC0gS2dCakpfPnUKqa54q8HHUBFo7n+Sa22ZJ/EzvakZ 5OfA== X-Forwarded-Encrypted: i=1; AJvYcCWdWQ/hB5qo8XU3PJsdr0pvTpg2zFdzIjybv787zT27KTiROkgoMqjMT8nOtvefyxGDq4LbZjHF114=@lists.php.net X-Gm-Message-State: AOJu0Yxt8aFbb4eH64/ZqiPORQ0ldc/C3VAPe3Dy2HLrUmMQ8Bq+7wXd 9ftfldpwP9ZamSAIOZjhTAIRuKq7NsjJVETzoONBVsU3HZuVCvWyFQVwe8m6a+M/hILcR+Bcyli glz0Xz3+vMnGUgdIGASWPrDiMsqU= X-Gm-Gg: ASbGnctL8LErfR6KeUpkcyRL+l/hcKd600s0LxtQq0ssehdICBx7gpzgohH+M/b9kSX BRpKXrlDzEs0/poumF1m/bdzvcHzR641kzKhWRk8NkoOZGU6K9uK9VyavuenyzRlCGTeCrMzSaK 2Swn1IkKDt3e4WJxglIa/7hw== X-Google-Smtp-Source: AGHT+IFGPtWE+XkxuQsZotw32aC6HXOQcO3D6PKGoZkNJy81fm3B+OScvlaFv3TQx9CIqX3tm/UO6gNHgeOcxfB3cOs= X-Received: by 2002:a05:6a20:1587:b0:1f5:6f5d:3366 with SMTP id adf61e73a8af0-203b40039d8mr8811404637.37.1744890606240; Thu, 17 Apr 2025 04:50:06 -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> In-Reply-To: Date: Thu, 17 Apr 2025 13:49:54 +0200 X-Gm-Features: ATxdqUGi-SeL4IZhXoGFHn9I-gWtr5VIZK0eDjiQdTwC5_nwp-2Y_6InriOz9Jk Message-ID: Subject: Re: [PHP-DEV] [RFC] [Discussion] Add WHATWG compliant URL parsing API To: =?UTF-8?B?TcOhdMOpIEtvY3Npcw==?= Cc: =?UTF-8?Q?Tim_D=C3=BCsterhus?= , Internals Content-Type: multipart/alternative; boundary="000000000000c1d1140632f8006c" From: nyamsprod@gmail.com (ignace nyamagana butera) --000000000000c1d1140632f8006c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I still have one last question regarding the RFC3986 URI path component. Currently the path is nullable but according to the RFC the path can not be nullable According to the RFC the path can have up to 5 ABNF representation > path =3D path-abempty ; begins with "/" or is empty / path-absolute ; begins with "/" but not "//" / path-noscheme ; begins with a non-colon segment / path-rootless ; begins with a segment / path-empty ; zero characters path-abempty =3D *( "/" segment ) path-absolute =3D "/" [ segment-nz *( "/" segment ) ] path-noscheme =3D segment-nz-nc *( "/" segment ) path-rootless =3D segment-nz *( "/" segment ) path-empty =3D 0 but none of which is null. The path can only be a string empty or not. so I would change the getPath and withPath signature to highlight that fact. Apart from that I have no more comments. On Thu, Apr 17, 2025 at 1:21=E2=80=AFPM M=C3=A1t=C3=A9 Kocsis wrote: > Hi, > > > > Tim D=C3=BCsterhus ezt =C3=ADrta (id=C5=91pont: 2025. = =C3=A1pr. 17., Cs, > 9:22): > >> Hi >> >> Am 2025-04-15 23:55, schrieb M=C3=A1t=C3=A9 Kocsis: >> > This was one of my (unspoken) ideas as well. I used to think there mus= t >> > have been a correct logic >> > for percent-decoding of WHATWG components, but if none of us can come >> > up >> > with a sensible >> > idea, then it's best not to try it, I agree. >> >> Sweet. I believe this was/is the last remaining blocker for the RFC or >> is there still anyone else from your side that needs to be discussed? I >> need to give the RFC another read once you made the adjustment to remove >> the WhatWg raw methods (and adjusted the corresponding explanations), >> but I think I'm happy then :-) >> > > No, I also think that was the last one, as I don't have any questions > left. Although, > we should finalize what the WHATWG getters should be named? I like the > explicit "raw" > that you suggested, but I can also see that it may be confusing for some > people. Altogether > I think I prefer adding "raw" so that it's clear that they behave > similarly how the raw RFC 3986 getters > do. > > >> For the latest changes from Tuesday, I see that you added the >> WhatWg-specific `InvalidUrlException`. The `Uri\InvalidUriException` >> however still has the `$errors` property. I think you might have >> forgotten to remove it, since the Rfc3986 implementation / the base >> exception does not expose any errors, right? >> > > I made the changes in the RFC in a hurry, so yes, I forgot to remove the > property. Thanks! > > M=C3=A1t=C3=A9 > > --000000000000c1d1140632f8006c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I still have one last question regarding the RFC3986 URI p= ath component.
Currently the path is nullable but according to the RFC = the path can not be nullable=C2=A0
According to the RFC the path = can have up to 5 ABNF representation

>=C2=A0 path =3D p= ath-abempty ; begins with "/" or is empty
                    / path-abso=
lute   ; begins with "/" but not "//"
                    / path-noscheme   ; begins with a non-colon segment
                    / path-rootless   ; begins with a segment
                    / path-empty      ; zero characters

      path-abempty  =3D *( "/" segment )
      path-absolute =3D "/" [ segment-nz *( "/" segment=
 ) ]
      path-noscheme =3D segment-nz-nc *( "/" segment )
      path-rootless =3D segment-nz *( "/" segment )
      path-empty    =3D 0<pchar>

but none of which is null. The path can only be a string empty or not= . so I would change the getPath and withPath signature
On Thu, Apr 17, 2025 at 1:21=E2=80=AFPM M=C3=A1t= =C3=A9 Kocsis <kocsismate90@gm= ail.com> wrote:
Hi,


<= /div>
T= im D=C3=BCsterhus <tim@bastelstu.be> ezt =C3=ADrta (id=C5=91pont: 2025. =C3=A1pr. 17.,= Cs, 9:22):
Hi
Am 2025-04-15 23:55, schrieb M=C3=A1t=C3=A9 Kocsis:
> This was one of my (unspoken) ideas as well. I used to think there mus= t
> have been a correct logic
> for percent-decoding of WHATWG components, but if none of us can come =
> up
> with a sensible
> idea, then it's best not to try it, I agree.

Sweet. I believe this was/is the last remaining blocker for the RFC or
is there still anyone else from your side that needs to be discussed? I need to give the RFC another read once you made the adjustment to remove the WhatWg raw methods (and adjusted the corresponding explanations),
but I think I'm happy then :-)

No, = I also think that was the last one, as I don't have any questions left.= Although,
we should finalize what=C2=A0the WHATWG getters should= be named? I like the explicit "raw"
that you suggested= , but I can also see that it may be confusing for some people. Altogether
I think I prefer adding "raw" so that it's clear tha= t they behave similarly how the raw RFC 3986 getters
do.


For the latest changes from Tuesday, I see that you added the
WhatWg-specific `InvalidUrlException`. The `Uri\InvalidUriException`
however still has the `$errors` property. I think you might have
forgotten to remove it, since the Rfc3986 implementation / the base
exception does not expose any errors, right?

I made the changes in the RFC in a hurry, so yes, I forgot to remove = the property. Thanks!
=C2=A0
M=C3=A1t=C3=A9
<= br>
--000000000000c1d1140632f8006c--