Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127141 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 B1DE91A00BC for ; Thu, 17 Apr 2025 20:48:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1744922740; bh=WY1ztzMrJFE7gvPiRTTBlnFEjHRJVYVsBjTYQdI3JqU=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=l6JS+KGtbeiYSClxi5/pvRL0eRAlBLTV4LRkG8p8VZZ0w+QIO6A+e5iao60hk2380 TL2qCBDuq/EEHJ9Xw/EGDzjRaFGxaXnieaaY2leR+FeAFpuEi0hYh3sZK7N0UCXXUe SnukGIeikkLlEnoN9iIQ2nDACu0E4kxDDCwwo9pL7YA2vY/SpIHzYW8UWEr2QTmf1W i8Gt0NPNU4/hLAAHq8i8J/V2wGGzNW1MjCUB1MrBSu19gCbQQuGUllUKIZj4j4aaIf j19rYj37eqcKYVV4P9ob0Vufeufp8bgiy0tlyl1mQ2gpPc2SXhPDFVbsLJraKLZ8hJ lXgmjdoW29psA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7B24E18005B for ; Thu, 17 Apr 2025 20:45:39 +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_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from premium76-5.web-hosting.com (premium76-5.web-hosting.com [162.213.255.108]) (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 20:45:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=pmjones.io; s=default; h=To:References:Message-Id:Content-Transfer-Encoding:Cc:Date: In-Reply-To:From:Subject:Mime-Version:Content-Type:Sender:Reply-To:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe :List-Post:List-Owner:List-Archive; bh=WY1ztzMrJFE7gvPiRTTBlnFEjHRJVYVsBjTYQdI3JqU=; b=IVpG8j9UZ40272BjyvYspTEVfT OxQOn9hqLCZL1HOe/XhOLn1+r0EKahOaBb5xCVjr6dn4fQ8AZ6YO6fyilCLu/VtVM2vtUal6hjJw4 XIsdZgnb9jE7/fwJ7LiN0KW6JPX0ic7aQB6TcluT7LBdWK8DSsZLiUHZcoEtt3da65RPPTiemVliw lfrWYnIR+fcPreVioE0PfnQbqKYCHdQ8JCCyWWeaZJxO1nUKQygcmbAG+5sXjnUdOseCnvjpkDQq4 f4L0TpTUDCItefwnIiDfVPbzASyzvPQC5RDYhSWKAs5joEXaSCrrvJxvKjyYXYDxhjIW8DqNU/ehW UH+bmpGQ==; Received: from 107-223-28-39.lightspeed.nsvltn.sbcglobal.net ([107.223.28.39]:58747 helo=smtpclient.apple) by premium76.web-hosting.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.1) (envelope-from ) id 1u5W9O-0000000GgMC-24GM; Thu, 17 Apr 2025 16:47:58 -0400 Content-Type: text/plain; charset=utf-8 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.400.131.1.6\)) Subject: Re: [PHP-DEV] [RFC] [Discussion] Add WHATWG compliant URL parsing API In-Reply-To: Date: Thu, 17 Apr 2025 15:47:46 -0500 Cc: =?utf-8?B?TcOhdMOpIEtvY3Npcw==?= Content-Transfer-Encoding: quoted-printable Message-ID: 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> To: Internals X-Mailer: Apple Mail (2.3826.400.131.1.6) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - premium76.web-hosting.com X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - pmjones.io X-Get-Message-Sender-Via: premium76.web-hosting.com: authenticated_id: pmjones@pmjones.io X-Authenticated-Sender: premium76.web-hosting.com: pmjones@pmjones.io X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched From: pmjones@pmjones.io ("Paul M. Jones") Hi Mat=C3=A9 and all, A one-off comment about the exceptions: The RFC posits that _Uri\UriException_ extends _Exception_, and = _Uri\InvalidUriException_ extends _UriException_. However, pre-existing userland solutions to the URI problem lean more = heavily on the native PHP _InvalidArgumentException_, which extends = _LogicException_. (Cf. = .) (_LogicException_ "represents an error in the program logic. This kind = of exception should lead directly to a fix in your code.") As such, the _InvalidUriException_ would better extend from = _LogicException_. What then to do with _UriException_ ? It's a base, it never gets thrown = anywhere. If a base is actually necessary, perhaps it should be renamed = _UriLogicException) and extend _LogicException_; then = _InvalidUriException_ can extend from that base. This leaves room for a = _UriRuntimeException_ base, should one ever be needed. -- pmj