Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130649 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 E44551A00BC for ; Wed, 15 Apr 2026 20:04:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1776283490; bh=avz5IA2YqCPSHmGKOMXQO38ue7Q7IE5iBtqbBpxQOrs=; h=Date:From:To:In-Reply-To:References:Subject:From; b=SUVxD/+R/1fF0juYPSSFlQN9TGcHByAQJjA+SPtfw5IiihxaCWklsYp7cdKUMOoOl b/PYCILxpeww5+kFGwNS7MhUlDq9QASwKYWlJ5EqdW+LXFrXVlGDu04cFI7xyM3yxM g7M6Rb2Tq7TPkZtZX3IXp9NxXmySI6CJjGBmNXZ04xQZhTd3HPHiNqf/AYkRQk/wNw 20JPalklFH+pGBSVD7vSAPpedEHUcv5Koy2XR1sxUf9S3V9FCOqCRWYCJG+ljI0Mca UJ/DAxIIG5oCP1jDNwr1gHATsrptjgd5ey8QIdneku1NY+TlTg5wDmEWlVFTfJ7N8H LzxsC+YF1YE7w== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B0D7E180061 for ; Wed, 15 Apr 2026 20:04:49 +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.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from fhigh-a7-smtp.messagingengine.com (fhigh-a7-smtp.messagingengine.com [103.168.172.158]) (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 ; Wed, 15 Apr 2026 20:04:49 +0000 (UTC) Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id 2127F14000F4 for ; Wed, 15 Apr 2026 16:04:44 -0400 (EDT) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-04.internal (MEProxy); Wed, 15 Apr 2026 16:04:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to; s=fm2; t=1776283483; x=1776369883; bh=iNZu4LdUZ9pIHfqBArlcX UTbONVYI3NHNc7TrbUFve0=; b=SAout51RWd+Z82+MS5HYGMhNUa7Lspb6FYKWW 2GHl7maY4WLwfb/yoj6M9GyvoWsPnwB1rNndZcIuqxqVnkA+YuSbOLg2qYKPloD6 OXw8ahVMDvFwx+0KquXCuLdHcURGDlHYrJbwkcMOS8jerTMM/m6eR9F7Ckxdffgk UfFsfPIPex4xq6Qpdf2BHB05oK/kpiWboKjo+PnJv/XWEWd9f+hRAo470D7CVJ/d rk+icSymfOCbL8GkEqyZGQEPMHHqY27PFD1EsBxE4O0e2C5lLYsrEX7hQsFeJbtg PR9xTt3W3f8nnh0zIwfoVRNGWxbvBlBzTFZwPG9pgej/kIreQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1776283483; x=1776369883; bh=i NZu4LdUZ9pIHfqBArlcXUTbONVYI3NHNc7TrbUFve0=; b=NeMkwcSW3moxFBtlO Ipo63BtC7ydvSlnw2mGTPRJVGPGu2sRPyp8q18remJ6kVYGdOdVhu5IqUhA+lmPB pRfNFpp32pjq4LliQGGZwr/WhndmFbza3hCOLsDeUxq0qTQiwKS8J5WPQ45SJ7TY lgbIB7ut+YZTJU3ypmduInVUQUbSQyTW8GbOmhkjDvSa/VCTOsv0SEDuvgbwFlNX gGWZGrzQPbIxlpkui68FIfxceOC5zBmAaBS1hnObPDZd5/SwnXTzOweDS/ZLAlEI /eU1tDqDfBdCt7JDKqSmwgaYmPfEL2tZ6cBiRmdZHnvYas894mJBLvm1aBZL3nJc /20rQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdeghedtudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefoggffhffvkfgjfhfutgfgsehtqhertdertdejnecuhfhrohhmpedfnfgrrhhrhicu ifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomheqne cuggftrfgrthhtvghrnhepffeiiedvhfdvgedutddtgeetieeugeevhfetheeffeeftedu iedthedtgeejueeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomheplhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhmpdhnsggprhgtphht thhopedupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehinhhtvghrnhgrlhhsse hlihhsthhsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id A556D700065; Wed, 15 Apr 2026 16:04:43 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 X-ThreadId: AfsvarjU34r7 Date: Wed, 15 Apr 2026 15:04:23 -0500 To: "php internals" Message-ID: In-Reply-To: References: <83238ad3-c844-4457-dfb3-11321787e022@php.net> Subject: Re: [PHP-DEV] [RFC] [Discussion] Followup Improvements for ext/uri Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: larry@garfieldtech.com ("Larry Garfield") On Mon, Mar 30, 2026, at 3:40 PM, M=C3=A1t=C3=A9 Kocsis wrote: > Hi Ignace, Everyone, > > I have recently clarified/updated a few things in the RFC: > > - How Uri\Rfc3986\Uri::getDecodedPathSegments() and=20 > Uri\WhatWg\Url::getDecodedPathSegments() exactly work > - The exact list of percent-encoding modes and their behavior > - Exactly how the percentDecode() methods work > > Please have a look at these changes, because I'd like to bring this RF= C=20 > to a vote soonish, since there's not too much debate > going on for a while. > > Regards, > M=C3=A1t=C3=A9 My apologies for taking so long to review this. It's been a hectic few = weeks Chez Crell. :-) From the builder examples: "echo $url->toAsciiString; " Is that missing () ? I'm not sure I agree that one should always reset() a builder before usi= ng it. There's plenty of good reasons to make a builder part way, then = fill the rest in separately. But I do agree that reset() should exist, = so the non-normative advice there is not a blocker for me. For host type detection, what does a null return signify? UrlHostType i= ncludes an Empty case, which I'd assume would be used in that situation.= And I'd rather have an Empty case on UriHostType as well rather than n= ull, unless someone can make a good argument for using null instead... LeadingSlashPolicy::AddForNonEmtpyRelative is... a mouthful. Self-docum= enting is fine, but as the example demonstrates it quickly creates super= long lines. That could be a problem in, say, a match() statement, insi= de a method, where with that enum value as a case you'd be more than hal= fway across the screen before you get to the executable code for that ca= se. Is there no way to make that whole thing shorter? I will also agree with Tim's comments in a separate message: The encode/= decode operations should not be static methods. They do not relate to t= he *type*/*class*, therefore they should not be on the type/class. Func= tions in namespaces are totally fine. I'm not sure how I feel about object methods on the enum. That would be= something like: use Uri\Rfc3986\PercentEncoder; PercentEncoder::Path->encode($someval); Right? That.. could work, but also feels quite convoluted. =20 use Uri\Rfc3986\encode; encode($someval, PercentEncoder::Path); Is about the same length, and with PFA easily pre-configurable, and clos= er to what is typically seen in the wild today. I think I'd lean toward= "just a function", but I wouldn't vote against the enum method approach= just for that. Aside from those (overall minor) points, this all looks great, and I app= reciate how much research has clearly gone into it! --Larry Garfield