Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118883 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 57167 invoked from network); 25 Oct 2022 12:10:26 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 25 Oct 2022 12:10:26 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A58B418005C for ; Tue, 25 Oct 2022 05:10:25 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS16276 91.121.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from mail.kd2.org (citrouille.kd2.org [91.121.181.110]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 25 Oct 2022 05:10:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=bohwaz.net; s=mail; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Subject:To:From:Date:Sender:Reply-To:Cc: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=BhshRtUsuxSFHNPdNGtbnso/o/SPhKbwWk4GxqjGC5Y=; b=NkAfdxAJTbz3WGOtM6LxTFdS8k WNvBxhDOGEFCbkqqxlY5UwYTQBjLivyb4nn1s/o2jNrwEAZNy8L405LYr1lUAoFvN7Fz+XDm2PEfh RSVkO0640gt6MScD1bTbot5GrLDK4EAidYu4Qy858zUfeyrcHa/bbkk4kpWMVByzq/aY=; Received: from 113.19.23.93.rev.sfr.net ([93.23.19.113] helo=platypus) by mail.kd2.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1onIlC-00D4cp-7f for internals@lists.php.net; Tue, 25 Oct 2022 14:10:22 +0200 Date: Tue, 25 Oct 2022 14:10:14 +0200 To: internals@lists.php.net Message-ID: <20221025141014.342851f4@platypus> In-Reply-To: References: <20221024045645.00bfc0d2@platypus> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) X-Face: #"dGtXaYpS9,C:d{FJZ<@4|;AL[R;I`|\;HN}zkw(rmBsu$)Dhed/z8e%U@Ra@JQ;,Nx?Xopxa+:gb?}efqG\/7TnBPHBRjU^g}$;rL4"jYrE#M^%*(?;Qb{HHbOf"q}bnOjU.'SEL:||\2*swZ>NN9pe(pnejy{ijk9%/8 As others have said, the correct, responsible way to do this would be > to make it gradual and keep warnings working until 9.0. I would > recommend: > > 1. 8.3, enableExceptions(false) raises E_DEPRECATED. > 2. 9.0 enableExceptions() defaults to true, and calling it with false > is an Error. (Calling it with true still works, but is a no-op.) 3. > 10.0 Remove enableExceptions() entirely. > > The behavior then only changes on major versions. Thank you, I updated the RFC in that direction. The sad part is that it will take a very long time before PHP 10.0 is released :( > I think we already did this for PDO, didn't we? It makes sense to do > it for SQLite, too. Slightly different: https://wiki.php.net/rfc/pdo_default_errmode PDO made the change to throwing exceptions without going through a deprecation. Maybe what I would prefer for SQLite3 is a middle-ground: * we keep ''enableExceptions(false)'' with no plan to remove it -> thinking about it, it doesn't really matter if you prefer warnings, and it would be easy to keep it that way * but we make SQLite3 throw exceptions by default directly in PHP 8.3, like it was done with PDO 2 years ago. That way you can keep the same behaviour as before just by adding enableExceptions(false) to your code, and it will not break. That seems like a better compromise no?