Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126813 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 5B1301A00BC for ; Mon, 17 Mar 2025 19:58:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1742241368; bh=wDs3bfjGx3Tovh+MLNjPsuJwWfxHgX87zRb7fik9u6Q=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=afglGPCD3kN0IYjDZit/L702h0fcT5ZByYo9vXP6p/nfUuunIFlobQ0UQBMNdxVit WG6FqwS0LXrtSC+OoYMnjvpjwwZcS2Ksr7pm/Sr3EGjQ8AB7GSZ1FrUPHyhv7Jsg4n hIokBScm4tV9RcfBts9R2zgs+uzAx4yBh2ChG9M0E0x+Vm4NxqnFQ7yjx0d5H4bE6L DO8WJY3eEin1JLqD4BKLJww4+fV8YsLksNpDAnWq8V+w1aqT1EU5DlHDMEdRISdEgu NHARRWT7NjsGbo2ELVaUfvE2itNM71oJeONtoIDKPby2yKv+Ihbfe1PTPSWhyw+oTn /tlP19rChJhDA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9474218007F for ; Mon, 17 Mar 2025 19:56:07 +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: No X-Envelope-From: Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) (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, 17 Mar 2025 19:56:07 +0000 (UTC) Received: by mail-qt1-f178.google.com with SMTP id d75a77b69052e-47691d82bfbso27094471cf.0 for ; Mon, 17 Mar 2025 12:58:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742241518; x=1742846318; 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=wDs3bfjGx3Tovh+MLNjPsuJwWfxHgX87zRb7fik9u6Q=; b=DCipZNGUYIO9qSHRXkKyumUjOUiwD3JLC6nnPqXR3MgeNFEgBWsg3JGZu92jKw28dv kbMhA4WO/xwUArrFRA/ovS7p3Gnydtd+Z8FILqeW7dLT0EPrjhzoW7uAJhw/9zihGIGC YThhCR/JZACZjIZxlcm6o77WVYEktLkWiToePQhbkgFtZGZ17zgj2hUMh+cDVZFWU7aX ccxqqBDnDx+xtlyfmfiL04x+xjFssc2oTGGuRT7AzsbuB5rztrIasb7DPx0fzA/yZGMV LpHJ4SqLNTIl/Rt9IGOkEUvtjuQhRhgu3o1oX7acNVNcFSKQ5847j54jGz0qGnb2zkpm bzbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742241518; x=1742846318; 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=wDs3bfjGx3Tovh+MLNjPsuJwWfxHgX87zRb7fik9u6Q=; b=MdQvvScT0+/1bv6Bn8RM/myyl48xIQdZhOY5rIZJ86SanpFYm3QX/wb8PDWr0eVdfh lc9EdGpbL7RSrGkC2nxcxrmapqY64JNn1xSsJK+RCdzeCAqBXwR0cdu5UZnfxNm7R3E6 p34EOJ1lDbSAhs5k4qWQN4uJaEt84t7wq57KwjNEv5jAeINoYzh5rlPuk22/BxtZgApQ h9iBz8KCYSJHwCXWDB+q2A1oKM6IwqY30Qb2Y18qlosXWz6/fp1tC2z8vRFqdXm8Q9rR yd3VgtOspVwIBlvTG9Dy3vppbVyBfGIk3ShkaEszHvIe6GM2wDLaHPtHnfXG5SPjZ/Hc ZYTg== X-Gm-Message-State: AOJu0YxAHRfzPkuWJjq/5T39cM7DDfSBx48RAeer3/CSRaCq90yrjH/N 7HiZnSrSMHd93EYPkHeC2SrIlFXVFhaoaGyXknnn8amNzsz/mS+7Midgd91Gj2FONKb7Z4aP27L X6MRHfgm25okPJ4OoKHDYyS45dSLY9xNhzvw= X-Gm-Gg: ASbGncvLapEyHkfb6EKGu8BIlEqyvbhsZhNAbph6yE/PqU6pUlgqgy/xLZGtZ50/s1k 7SGOON+OsP1VVJ3Gr+wLyIudosN5qcGBj1MlRjL2O94AiEXiK/ibX4xXlEgDVsxMUCq4l5d0X39 d30QE+uaiuxZ6i6W46xmiNvU/bQQfIafyWaf5a X-Google-Smtp-Source: AGHT+IFAm4NfEkSysZoZs8V8Wnjmz2VCTTWJ+qZCxYzjJm+M24qMg6wBGyKWCB4d3ym5Bwi52nfKjA1eym4K8Pu5nfk= X-Received: by 2002:a05:622a:1496:b0:474:fee1:7915 with SMTP id d75a77b69052e-476c81682d5mr226077601cf.31.1742241518460; Mon, 17 Mar 2025 12:58:38 -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> <9bf11a89-39d9-457b-b0ea-789fd07d7370@gmail.com> <6430b9ed-638d-4247-9fa9-d1a9148c382b@gmail.com> In-Reply-To: <6430b9ed-638d-4247-9fa9-d1a9148c382b@gmail.com> Date: Mon, 17 Mar 2025 20:58:27 +0100 X-Gm-Features: AQ5f1Jq4o42wcHsnY2jy-uTv5QwSOrrMDUmJTzMoomdFgBWb5Jj9Krr7FhGoTxo Message-ID: Subject: Re: [PHP-DEV] [RFC] [Discussion] Add WHATWG compliant URL parsing API To: nyamsprod@gmail.com Cc: PHP Internals List Content-Type: multipart/alternative; boundary="000000000000d223bf06308f367f" From: kocsismate90@gmail.com (=?UTF-8?B?TcOhdMOpIEtvY3Npcw==?=) --000000000000d223bf06308f367f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Ignace, 1) around `Uri\UninitializedUriException` If I look at the behaviour of > `DatetimeImmutable` in the same scenario or a Userland object instead of > throwing an exception an error is thrown > > see: > > - https://3v4l.org/d4VrY > - https://3v4l.org/Wn7En > > Shouldn't the URI feature follow the same path for consistency ? Instead > of throwing an exception it should throw an Error on uninitialized issue > at least. > Yes, you are right! Uri\UninitializedUriException should extend an Error indeed, since people shouldn't try to catch it either. > > 2) around Normalization. In case of query normalization, sorting the > query string is not mention does it means that with the current feature > > `http://example.com?foo=3Dbar&foo=3Drab` > is different from > `http://example.com?foo=3Drab&foo=3Dbar` > > Yes, that's the case, this feature is not implemented. As far as I see though, it's better not to change the order of query parameters, especially the order of duplicated parameters in order not to accidentally change the intended meaning of the query string. What's your stance here? M=C3=A1t=C3=A9 --000000000000d223bf06308f367f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi I= gnace,

1) around `Uri\UninitializedUriException` If I look at the behaviour of `DatetimeImmutable` in the same scenario or a Userland object instead of throwing an exception an error is thrown

see:

- h= ttps://3v4l.org/d4VrY
- h= ttps://3v4l.org/Wn7En

Shouldn't the URI feature follow the same path for consistency ? Instea= d
of throwing an exception it should throw an Error on uninitialized issue at least.

Yes, you are right!=C2=A0Uri\UninitializedUriException should ext= end an Error indeed,
since people shouldn't try to catch it either.
=C2= =A0

2) around Normalization. In case of query normalization, sorting the
query string is not mention does it means that with the current feature

`http://example.com?foo=3Dbar&foo=3Drab`
is different from
`http://example.com?foo=3Drab&foo=3Dbar`


Yes, that's the case, this feature is no= t implemented. As far as I see though, it's better
not to change=C2=A0the order of query parameters, especially the order of d= uplicated
parameter= s in order not to accidentally change the intended meaning of the query str= ing.
What's your stance here?

M=C3=A1t=C3=A9

=C2=A0
--000000000000d223bf06308f367f--