Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118885 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 70462 invoked from network); 25 Oct 2022 16:37:42 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 25 Oct 2022 16:37:42 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D25DB180054 for ; Tue, 25 Oct 2022 09:37:41 -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=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS19151 66.111.4.0/24 X-Spam-Virus: No X-Envelope-From: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (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 09:37:41 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 1BDAB5C004A for ; Tue, 25 Oct 2022 12:37:40 -0400 (EDT) Received: from imap50 ([10.202.2.100]) by compute1.internal (MEProxy); Tue, 25 Oct 2022 12:37:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1666715860; x= 1666802260; bh=tp+pRsaB+ce4v/kTZzWPua5mnflrqt7QLknW7wGtmI8=; b=G i8MoOf7p/oB2B/wxQQTnH8lk8mSFKHXDLypDPHidt38ErGmreoOYcGIqwVIAf981 uT8YEGnVUGGpcwnAirOEGdj0evTtqsFveolPK5EHixUWqhfERSq/JkweKx3w1RCS zxeNcfGmPbrYOklrmSqN1MGVPyKHZF9tsQIKwyKgfWMu9wtReddfaU6YRpr4wiyX KG07zzdiw7MtQd9NHnsaBzxXXzgGAtRAbJqUhlBNTaDPDoHrAGgxVhZDfyYT+8xf eDzupj0yqwX1QQR74vUDxiurCSIFHgC73LtC3QEDWSxeqAOIPKClHRs78sOH6b4D hIIV1TxQLpkA075DOpjwg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1666715860; x=1666802260; bh=tp+pRsaB+ce4v/kTZzWPua5mnflr qt7QLknW7wGtmI8=; b=Mi7qr2F6w1+XR9+umpbdAcW5vAtwztdxBRnoZRxL1nkC bp7EjMD1B2T9fiIq5pw37b+wqs46a7B5ax/lHfAHYaI3IBuEamFcSC1d/DBBG74O o1NizPXtVn4BY5B7aacMSio1Z/ndEdJ8hGeGW53NnSScoWb+T1T4r+olcmHivAvy gpHR7YcO49xoahuf/muOVn3vzFoo2KcDGBzQ5yw5U4V7smV+vslustUWnVT7TQuX hb32brN9iEEG2vFyzVpWNzb0Fc1kXksxv/4rvEsjEoUYTZhuLCKLgBQCw2Kiz5/i DbuVS8xsWfdyk8bbGMXwH+mLaDMfFdSr55EtcTPdUw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrtddtgdejgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfnfgrrhhr hicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomh eqnecuggftrfgrthhtvghrnhepveehhedvveejledvvefgleevffdtjeekledvkeegheff gfeivdejhffhledtudetnecuffhomhgrihhnpehphhhprdhnvghtnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhgrrhhrhiesghgrrhhfihgv lhguthgvtghhrdgtohhm X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id BF1FB1700083; Tue, 25 Oct 2022 12:37:39 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-1047-g9e4af4ada4-fm-20221005.001-g9e4af4ad Mime-Version: 1.0 Message-ID: In-Reply-To: <20221025141014.342851f4@platypus> References: <20221024045645.00bfc0d2@platypus> <20221025141014.342851f4@platypus> Date: Tue, 25 Oct 2022 11:37:18 -0500 To: "php internals" Content-Type: text/plain Subject: Re: [PHP-DEV] [RFC] [Discussion] SQLite3: remove warnings, move to exceptions From: larry@garfieldtech.com ("Larry Garfield") On Tue, Oct 25, 2022, at 7:10 AM, BohwaZ wrote: >> 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 :( Yes, but as of 9.0 it won't do anything. The cost of leaving it there for an extra few years as a no-op is very small compared to the benefit of an easier upgrade path. This way, people can leave enableExceptions(true) in their codebase and it will work without difference from 9.4 back to... ever? Those are the people doing it right. Be nice to those people. :-) It would only be something they need care about in 10.0, by which point dropping support for PHP 8 and earlier would be a no-brainer. >> 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. Well that was silly. > 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? No, because the goal should be to get everything consistent on using exceptions always. The mixed-mode error handling is a mess that benefits no one and makes collaboration harder. Moving toward all-exceptions is the right way to do it, just in a graceful fashion. --Larry Garfield