Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127216 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 CC07A1A00BD for ; Sun, 27 Apr 2025 21:47:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1745790302; bh=trZp8LuHkmdey+Qh808naPdQbsbu+SoDoDviaObbjZQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=cnTbGqKkJBQOWlJDVl+Etur8cpyxdZ4MYIdrVDS9nwXT3ehzN0tc9oOOLDDACR/VE KUFJ8kZzjfQGH3JyY9siCx1MXv7v2jmfxViurCSFDSJ9M+JuoQc7OCQVSnhtCGwqdI Kh/e2nozmpl8V3EhMwByk7APBxjDFv6pH9rl/Q40fUUn0AwOfII26BfWaa29oxPn3W NZNI5cbZPtJCVdqSWOKo1MzzCj4bQP5WXBNAA6XPczDXokb07icTSTuIz/Il1gIMx7 NJ2ZE2lhbREAw3Q96BGl7Gw1mD+kl3qo1JD06ibS8qsjRt6wL8PRPMdI36+H6eG01s 9YRhO7ogZNRsQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E254F180068 for ; Sun, 27 Apr 2025 21:44: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=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, FREEMAIL_ENVFROM_END_DIGIT,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-qt1-f182.google.com (mail-qt1-f182.google.com [209.85.160.182]) (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, 27 Apr 2025 21:44:58 +0000 (UTC) Received: by mail-qt1-f182.google.com with SMTP id d75a77b69052e-4775ce8a4b0so88692021cf.1 for ; Sun, 27 Apr 2025 14:47:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745790435; x=1746395235; 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=trZp8LuHkmdey+Qh808naPdQbsbu+SoDoDviaObbjZQ=; b=LHWaP/IODU2LBYgCofk8a2wJmJ6IDR2m0ZJfw1v4s7kPMF0qFa/H2B+jh9L2/9JveM 096XY0kbQtEb6g0EBUjPlQ5irV5JuBK7TPsuM+qVfm78swLIuIN8GH9gEiqvNj6rWV+y oIlp+U52jvl4okjhqfXGgjTR60Ki6CH0EsS8Pm/H9+e78taBb6e2jA4bzWD9ylEZH5rw zyRAtgN9S97RlDZewl0F1IJ6KT2qMS6wmnN7BYHlF7Yo/YSR8CaHSwFideMpw2mxYbZD SmvhCrHS3GATRhL0Lce5svMgtU9qJxavwWOp7246Ee06Lf6wksePyKcFDSP8SEAI+xlc h2bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745790435; x=1746395235; 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=trZp8LuHkmdey+Qh808naPdQbsbu+SoDoDviaObbjZQ=; b=qWdXcNKKySBOLSrpl9/Wr2YS/lfbjAkiY9J0TfbTQZ/16tZ2vUh4YqIAX0x/S5CL8Z Vp1U2Jow5HczfCv4kunAqFW//Y/goO19i3r0mvon6/MzAExfHrTLLWEFTB9NFFtWTWDf 6/2XNt15R6cBs3rnq+jHLPGS0SWESklbSKaN9p99itGYOAKuDFSlAKq97g+lq8MgRIYc h2EmtaTSxhlvKOtgLnkVYATOidBVw/mu6SjnLlj1KIuFdEIDBfNd7efksQsxI5WGB9Ha uciWOdS6A6wM/P7hG+sSW+uEE1fCu2r8pYlw2lOhUm7phAQPN4sq9yYMVmd1s+3748vB IUuw== X-Gm-Message-State: AOJu0Yzq4p+dYCdW65EsZXttWKG6ZKkphONxl8sTiGcl0gRUiFQK4F2Q rg8b45UpSu3Ekwe3Evk/F78dB/0yT89g8KjXL21BoD9+k5JNMe+xqTDhyK73hpj4i0VXXthSPks 0+ldOdJu3c0qZpPC+wtz1crsYf0c= X-Gm-Gg: ASbGncu/sYfbuYk2olgpCL14OPEHDNn91ZP/CJlTcEe7bK2IdhbkwgKXMqhfb9bo8zz NeBABlno9/xIZwXpdnxwJto/Ct/Eoy3/53qV1fsSZsHn1G2VJiEi5GbhT70KL77pKqVAkuVXw1X 06L1IXPmdN+cU9Kcg+BiWGVw== X-Google-Smtp-Source: AGHT+IEaZqlDEs6Png3nxtaqsgL6AvBVIF89vmKsx3E2L5nl6ckzTfLkGfo0SgCIazPnsg9I3irBCzhYcR2++saIH0A= X-Received: by 2002:ac8:7d01:0:b0:476:6f90:395e with SMTP id d75a77b69052e-48131903f91mr121999521cf.21.1745790435365; Sun, 27 Apr 2025 14:47:15 -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> In-Reply-To: <76d96ea8a78c6025128c0a4b01c94c0a@bastelstu.be> Date: Sun, 27 Apr 2025 23:47:04 +0200 X-Gm-Features: ATxdqUH7xsNxIogJbMogakT0MrzpZibox2bYwNZ5K6yc016DB0_j1TJMbkJ6Bps Message-ID: Subject: Re: [PHP-DEV] [RFC] [Discussion] Add WHATWG compliant URL parsing API To: =?UTF-8?Q?Tim_D=C3=BCsterhus?= Cc: Internals Content-Type: multipart/alternative; boundary="000000000000c097d40633c98235" From: kocsismate90@gmail.com (=?UTF-8?B?TcOhdMOpIEtvY3Npcw==?=) --000000000000c097d40633c98235 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Tim, > In https://news-web.php.net/php.internals/127114 I suggest to only > provide the "non-raw" methods, so I believe you misread that. I've just > given the RFC another read and thought about the naming and I believe I > still prefer not having the "raw" in the name: > > - Having the `raw` in the name makes the API very clunky / verbose to > use. > - Other implementations, such as in browsers or node.js, also simply use > the component name without any indication of the output being raw. > - Future changes to the WHATWG URL specification might introduce some > normalization for components that currently doesn't have normalization. > This would make the `raw` naming a misnomer and might require new > methods / deprecations on PHP's end. > > So it seems to be safer to use the naming without the `raw` and then in > the documentation explain what happens with useful examples, just like > the RFC already does. > > We discussed this off the list, and the recommendation made sense to me at last. I described the rationale in the RFC around the end of the "Component retrieval" / "Basic examples" section. Additionally, I recorded a few WHATWG related "deviations" from the specified getter and setter steps along with the rationale of these choices. Other than that, I noticed the following small issues: > > I fixed all these small errors, thanks for pointing them out. > 5. > > In the "Serialization" section: The explanation of the serialization > format is overly specific regarding the implementation details. I would > simplify that to just say "it supports serialization by using the > toRawString() output and performs strict checks during unserialization" > or similar. The reason is that I want to make some suggestions to the > serialization format to provide greater flexibility for future changes > during the technical review of the implementation :-) > After an off-the-list discussion, I updated the RFC text so that it reflects the desired behavior (that is consistent with the serialization format of ext/random). Regards, M=C3=A1t=C3=A9 --000000000000c097d40633c98235 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Tim,
=C2=A0
In https://news-web.php.net/php.internals/127114 I = suggest to only
provide the "non-raw" methods, so I believe you misread that. I&#= 39;ve just
given the RFC another read and thought about the naming and I believe I still prefer not having the "raw" in the name:

- Having the `raw` in the name makes the API very clunky / verbose to
use.
- Other implementations, such as in browsers or node.js, also simply use the component name without any indication of the output being raw.
- Future changes to the WHATWG URL specification might introduce some
normalization for components that currently doesn't have normalization.=
This would make the `raw` naming a misnomer and might require new
methods / deprecations on PHP's end.

So it seems to be safer to use the naming without the `raw` and then in the documentation explain what happens with useful examples, just like
the RFC already does.


We discussed this off the list, and th= e recommendation made sense to me at last.
I described the ration= ale in the RFC around the end of the "Component retrieval" / &quo= t;Basic examples" section.

Additionally, I re= corded a few WHATWG related "deviations" from the specified gette= r and setter steps along with
the rationale of these choices.

Other than that, I noticed the following small issues:

=

I fixed all these small errors, thanks for pointing the= m out.
=C2=A0
5.

In the "Serialization" section: The explanation of the serializat= ion
format is overly specific regarding the implementation details. I would simplify that to just say "it supports serialization by using the
toRawString() output and performs strict checks during unserialization"= ;
or similar. The reason is that I want to make some suggestions to the
serialization format to provide greater flexibility for future changes
during the technical review of the implementation :-)
=
After an off-the-list discussion, I updated the RFC text so = that it reflects the
desired behavior (that is consistent with th= e serialization format of ext/random).

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