Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113003 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 49236 invoked from network); 27 Jan 2021 14:53:26 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 27 Jan 2021 14:53:26 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3987A1804CF for ; Wed, 27 Jan 2021 06:35:09 -0800 (PST) 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-Virus: No X-Envelope-From: Received: from darkcity.gna.ch (darkcity.gna.ch [195.49.47.11]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 27 Jan 2021 06:35:08 -0800 (PST) Received: from wafer.home (unknown [IPv6:2a02:1205:5053:a220:50a:95c6:f7f2:680f]) (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 A1E9C1514A3D; Wed, 27 Jan 2021 15:35:04 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.40.0.2.32\)) In-Reply-To: Date: Wed, 27 Jan 2021 15:35:04 +0100 Cc: PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: <30C0E1A8-6269-4221-AF21-3FA738D5910C@cschneid.com> References: <0edafce4-c9a5-c483-65f1-72e49614135a@telia.com> <4D7D042F-39A5-4BEF-93B6-542FD53928A1@cschneid.com> <73C12DD2-D99E-44BA-B557-6043F3DDD4C7@cschneid.com> To: Nikita Popov X-Mailer: Apple Mail (2.3654.40.0.2.32) Subject: Re: [PHP-DEV] [RFC]: Change Default mysqli Error Mode From: cschneid@cschneid.com (Christian Schneider) Am 27.01.2021 um 14:34 schrieb Nikita Popov : > I think if you wanted to introduce an additional diagnostic step, the = way to go about it would be to issue a deprecation warning when creating = a connection without mysqli_report() having been explicitly called = beforehand. Wouldn't this mean everybody would add mysqli_report() to their code? And wouldn't this render the default of mysqli_report() entirely = useless? Or is your idea that at a later stage you then want to create a warning = for manual mysqli_report() calls? > As others have said, the warning mode is pretty much entirely useless, = and what you really want (presumably) is to know about the places where = you need to explicitly call mysqli_report() to preserve the old behavior = (or explicitly switch to the new one). No, I want to know if I have any code which needs fixing so I can see = how I want to change those places e.g. a duplicate key from INSERT to = REPLACE or whatever the correct fix is. Without the code aborting. Yes, individual developers can switch on = mysqli_report(MYSQLI_REPORT_ERROR) *now* to get this behavior but I = still think this makes more sense as a default. Otherwise the temptation = is big to just add a global mysqli_report(MYSQLI_REPORT_OFF) everywhere = just in case. - Chris