Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123916 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 365F61A009C for ; Thu, 27 Jun 2024 03:57:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719460756; bh=AXLnEPFWF13XLooAlInR0YE4cs/9ufQ9HXMaEak024k=; h=Date:To:From:Cc:Subject:In-Reply-To:References:From; b=hhus1pdh7ZJo7JzNSP1kni1XTkDcGs+lfJePadtN0CsjJrxeJgPffLbYVkF6lfSrk uLaKN7mR2bXykOEF0NL+CYqLUzGh5BeqRzANw+6tls498aP4f2M+yhwKy2eawUHm73 KVi5E9T6bVjrUVO69uPV1ESQOgIocwyCb3jzukVm1gbaXwwX+teXmq9DCT9BhsaSny VRPam1VeamgMv7vDQcn7DqdpFoii4C+wfT4QP+9bttA04QmcTNvhseo2Gq1bfAjql2 rwUtjAcfGh50/K8GHICxBLXVPoTGl0Yvy+MMdC/zrubS89R+ZZo88gFj9TtWIn1kx/ N8Yhe86+Mqf5w== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 10F131801E4 for ; Thu, 27 Jun 2024 03:59:15 +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.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE 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-4018.proton.ch (mail-4018.proton.ch [185.70.40.18]) (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, 27 Jun 2024 03:59:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gpb.moe; s=protonmail; t=1719460674; x=1719719874; bh=AXLnEPFWF13XLooAlInR0YE4cs/9ufQ9HXMaEak024k=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=kitU2v09j9V9bvchzWfmSGpMBYhMLGta4GYO3X7DoGQBg/HyMIwj1+srsssHze1vg ujKWRM+lGg0YsViL1zLUKTCNf0Tu9Za1x/jJbGfgu0VNcr+WGVqY2BBE7IpYXUDvTc y+4jAF+dkpYWzsCJniZTHqniYDpFdBa8kgKk5390thv2yjwd4p3wMCUO67HKLUFl9b ObkvTsirSzeQceu/f8v+0saakVCVgRFxnQ+6RDcDeQHPH86gzY0x6gUhWSu/ni7LBx 9dyMIpP4VaOD/zzRQqsyAoh/KKG5bQw/SFe4lOxNXJtsM690E5KCp3oTifm1LkV/UX k6xxypm/m3qHQ== Date: Thu, 27 Jun 2024 03:57:51 +0000 To: Kamil Tekiela Cc: PHP internals Subject: Re: [PHP-DEV] [RFC] Deprecations for PHP 8.4 Message-ID: In-Reply-To: References: Feedback-ID: 96993444:user:proton X-Pm-Message-ID: 9da3a3e26c71d2d841c930460830d9a046a5ebbc Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: internals@gpb.moe ("Gina P. Banyard") On Wednesday, 26 June 2024 at 14:54, Kamil Tekiela w= rote: > I think the "Deprecate passing E_USER_ERROR to trigger_error()" should > be better explained. Why is using this constant a problem? There is a > link to another RFC, but I can't see an explanation as to why > E_USER_ERROR suffers the same problem as fatal errors do. From an > average Joe's perspective, it looks fine and does the job > https://3v4l.org/e97TO Returning control after an E_USER_ERROR seems problematic to me in the first place, as the condition which lead to the trigger surely implies the current code is unable to handle the situation. See: https://3v4l.org/7pdvO But the issues with fatal errors are the same as explained in the linked RFC, in that destructors (and finally blocks, etc.) are not called. See: https://3v4l.org/J5NXF Using exceptions instead is more robust. Is this explanation clear enough? If so, I will incorporate it into the RFC. Best regards, Gina P. Banyard