Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127251 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 4263D1A00BC for ; Wed, 30 Apr 2025 11:18:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1746011772; bh=VXo4a0iJybbwJskgmUxWG6e5EnBZS0ewLPSDdtAybyc=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=Qs/3HPgXcvRcIULCMVmxI73bvGNzXJ8zGosZQnuLvhz3zPzI31nBL+crypmFkremh xjUmAJBOLNy+SkP31Kyg/fzNvI72PGBaXBSdLUaXHtvvp/NuOGtuWvDa2upPFi6m0D gsL8qjJy8gUJF9wpbwrC2nqC715nQxNau08b6UiybUIxBLdXI1Yg8rPTB9jc3RPWEB /fr6BfS8S+DvPg6Zxu86hos7Pp30tJQC56YnMzg1Ddivehq3ofiMrQcPsscVFYlBIT 9M4SOCho4neH+cf/IWW6VP5WouriG1IxqZQAL8/+AwNP3daJTfZgyGBSN3TRJdyG1r NRPOycPZ5EKaQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C19AC180052 for ; Wed, 30 Apr 2025 11:16:11 +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=3.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_PASS, SPF_SOFTFAIL 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 xdebug.org (xdebug.org [82.113.146.227]) (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, 30 Apr 2025 11:16:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1746011906; bh=VXo4a0iJybbwJskgmUxWG6e5EnBZS0ewLPSDdtAybyc=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=D/Q8KAwbksceJzvkafAt2mQrPb9LilM+LSnYMxy1dpvQrmj26j6KXzzlE0ozofEY2 D5z7bRq6j9HSFbPCiB1w2HE+vsY9XON0p6ZF9Q/YoyHCKu52KKM0bBA2zWXH03ISjp LkfMYBLBiPeEYGDLDCfEu7gB+n4vuwZ3I2wX0f9Yn8MeANd1pR/piEfQ0K4jPqiTkG 0Sni61ckWzXxaV64O+asILO1aGeaOD948bw/RZddsnn02ekXC9xq5P62Fvnb5aEg8w waTRRYKYjgOjhQwQ6ppwg6e9wPxWeGuoSHQZ46Dre2rSrNLTlsSWYoclasuZtlJ6BQ 5m6mKvDZ6h8zg== Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id 7B65010C00E; Wed, 30 Apr 2025 12:18:26 +0100 (BST) Date: Wed, 30 Apr 2025 12:18:26 +0100 (BST) To: =?UTF-8?Q?Tim_D=C3=BCsterhus?= cc: PHP internals , "Gina P. Banyard" Subject: Re: [PHP-DEV] [RFC] Throwable Hierarchy Policy for Extensions In-Reply-To: Message-ID: <4233b00a-7593-e70d-f235-da650cd7bac6@php.net> References: Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="8323329-1145515999-1746011665=:76401" From: derick@php.net (Derick Rethans) This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1145515999-1746011665=:76401 Content-Type: text/plain; CHARSET=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Sun, 27 Apr 2025, Tim D=C3=BCsterhus wrote: > Hi >=20 > as announced in the URI RFC discussion thread > (https://externals.io/message/123997#127142), I've now written up an > =E2=80=9CException Hierarchy=E2=80=9D policy RFC together with Gina. >=20 > Please find the following links: >=20 > RFC: https://wiki.php.net/rfc/extension_exceptions > Policy PR: https://github.com/php/policies/pull/17 >=20 > The RFC itself also contains additional references. >=20 > This message is intended to begin the official discussion period. Please = do > not comment on the PR itself, but reply to this discussion thread for pro= per > visibility. - Exceptions MUST NOT be ``final``. Could the RFC explain why not? - The name of the extension SHOULD NOT be used as a prefix or suffix of=20 the unqualified class name of additional exceptions. Could you add an example of how to do it instead (or a "not this" "but=20 that" example)? - Any two exceptions with different causes MUST be identifiable either=20 by a unique exception class name, a stable ``$code``, or a=20 class-specific additional property suitable for programmatic=20 consumption (e.g. an enum). I would probably not even allow the stable ``$code`` in here, as I have=20 seen from experience people don't really check for them. cheers, Derick --=20 https://derickrethans.nl | https://xdebug.org | https://dram.io Author of Xdebug. Like it? Consider supporting me: https://xdebug.org/suppo= rt mastodon: @derickr@phpc.social @xdebug@phpc.social --8323329-1145515999-1746011665=:76401--