Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109144 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 26621 invoked from network); 19 Mar 2020 14:02:26 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 19 Mar 2020 14:02:26 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0C1FE180504 for ; Thu, 19 Mar 2020 05:25:36 -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.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS1836 195.49.0.0/17 X-Spam-Virus: No X-Envelope-From: Received: from darkcity.gna.ch (darkcity.gna.ch [195.49.47.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 19 Mar 2020 05:25:35 -0700 (PDT) Received: from flatter.home (unknown [IPv6:2a02:120b:c3f7:5090:add6:db90:3b83:535d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by darkcity.gna.ch (Postfix) with ESMTPSA id 639496C1516; Thu, 19 Mar 2020 13:25:34 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) In-Reply-To: Date: Thu, 19 Mar 2020 13:25:34 +0100 Cc: Larry Garfield , php internals Content-Transfer-Encoding: quoted-printable Message-ID: References: <99c00084-c212-ad23-628e-87f35e2de849@allenjb.me.uk> <782751cf-0058-4dae-9f5a-40648a79986d@www.fastmail.com> To: Matteo Beccati X-Mailer: Apple Mail (2.3608.60.0.2.5) Subject: Re: [PHP-DEV] Changing the default PDO error mode From: cschneid@cschneid.com (Christian Schneider) Am 19.03.2020 um 10:31 schrieb Matteo Beccati : > On 14/03/2020 22:10, Larry Garfield wrote: >>> What do you think the new default be (and why)? >>>=20 >>> (I am aware this change will likely require an RFC) >>>=20 >>> AllenJB >>=20 >> I see only two options: >>=20 >> 1) Do nothing. >>=20 >> 2) Move to Exceptions. >>=20 >> I've never used PDO and not set it to Exceptions, honestly. Adding = more global error conditions to code is a terrible idea, so let's not do = warnings. If your query breaks, you really shouldn't continue because = your data is busted so your following code will fail ungracefully at = best, or corrupt data at worst. >>=20 >> Changing a default like this seems a reasonably safe thing to do in a = major, as long as it's still just as easy to switch back to silent mode = for those who prefer to be explicit. >=20 > I agree defaulting to PDO::ERRMODE_EXCEPTION is a sensible change for = PHP8. I think this should go through a deprecation phase first as it is a BC = break, no matter how easy to fix you think it is. - Chris