Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112994 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 11444 invoked from network); 26 Jan 2021 07:16:19 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 26 Jan 2021 07:16:19 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DB1391804F6 for ; Mon, 25 Jan 2021 22:57:42 -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=-0.2 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-io1-f42.google.com (mail-io1-f42.google.com [209.85.166.42]) (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 ; Mon, 25 Jan 2021 22:57:42 -0800 (PST) Received: by mail-io1-f42.google.com with SMTP id e22so31672819iog.6 for ; Mon, 25 Jan 2021 22:57:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mupkjjw0Punbp5jylF0cALq5vTEejrQ+cqqh7TIuS8Y=; b=jJQtAzPumQHvJHuYPjr4o9Ur5Zeed0wrBcaUZB4ULJ1tbLN6xOg6itizpBGxEiAmhF IIp1NQRnOjNhJSofk6OVEkzeznFtU7Da7GTHo00gL6EhNKgEy+KmD4BqmEsLY+ko8ZlI GHWyn0u+9KGkZz3HztM/Vk59XuQa4b74Xene987e4Su6F8gINFF2EnSKAuKvgAhthRcl PkECCtS1u2pGSpFyB/iDcUiSJEeKRmmmD2Mbq+BrSThAl18W8AMwOg75wj4f9/4IRZGT WOKHEP1vQ93ZjYEkfvJbmXpmLZKsOSHZbeA5/3aavZLol8fFa3HHZ93IsuC3yHEkLDSE uc5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mupkjjw0Punbp5jylF0cALq5vTEejrQ+cqqh7TIuS8Y=; b=WvN0oPsZ+0naJVIBn+U2ZM9io/LsQy1pLb6BPdYOv2S86gf1EQ2E62u9jD+zoINWVA lMh6R6f2ObOGYgKmx0XrypN+9UOiPGsZsTCi0KJHZwQ9uqspJhkG/+yoFFiOrJRU5LHK mQZUulpRLus0fNmPKPSXk0vei6fKvN4jsoVKsRbYqeYGF19pQwfbibLTnqqGwlVUARb2 o489/Hzs6O1d93qa/u+sEKRFH7sLS13l0QElQOj6mJdcMDg9NxiYFqDm8txOgRPjXS9f RM7HKW+OXLu/IhHaLUta/r7yTixBKHfPc9TD6i0UWaIC3EYboo3uuqOmHPQAR3OTtzQC LcJg== X-Gm-Message-State: AOAM533nmHd/GFKDGl3Yv4oCPouXFnHnsTFNbCObBrJdonZ7j6xdm3fc jVYOniZg+F3ANSzmnC2HCvWqAKLOoIFPHfN+gsQ= X-Google-Smtp-Source: ABdhPJy96gH4qX/u9HE/WQ4NNKs+ToD39wbyKrtSQeLlVmIoEL3uZAwvSjm1o+fHNSahKZq+EMT8a+/pim8mTwzmQOo= X-Received: by 2002:a02:ccf6:: with SMTP id l22mr3655050jaq.113.1611644259243; Mon, 25 Jan 2021 22:57:39 -0800 (PST) MIME-Version: 1.0 References: <0edafce4-c9a5-c483-65f1-72e49614135a@telia.com> <4D7D042F-39A5-4BEF-93B6-542FD53928A1@cschneid.com> In-Reply-To: <4D7D042F-39A5-4BEF-93B6-542FD53928A1@cschneid.com> Date: Tue, 26 Jan 2021 08:57:21 +0200 Message-ID: To: Christian Schneider Cc: "G. P. B." , PHP internals Content-Type: multipart/alternative; boundary="000000000000939bea05b9c82b0c" Subject: Re: [PHP-DEV] [RFC]: Change Default mysqli Error Mode From: drealecs@gmail.com (=?UTF-8?Q?Alexandru_P=C4=83tr=C4=83nescu?=) --000000000000939bea05b9c82b0c Content-Type: text/plain; charset="UTF-8" On Mon, Jan 25, 2021 at 7:33 PM Christian Schneider wrote: > Am 25.01.2021 um 18:22 schrieb G. P. B. : > > And yes I'm basically advocating for people to add > mysqli_report(MYSQLI_REPORT_ERROR) (or even > mysqli_report(MYSQLI_REPORT_OFF) if they fancy) to their setup, I'm even > advocating for them to do it right now such that they can catch anything > ahead of time. > > Defaults matter. Most people will *not* do this step and their code will > fail on upgrade. > > > Moreover, this proposal does not prevent you from using the warning mode > instead of jumping to exceptions directly, the key point is that you need > to specify it, and I personally believe that having the warning mode as the > default mode is the worst choice for the reasons I mentioned previously. > > Agree to disagree. > > If I have the choice to make the smoothen the transition centrally with > PHP defaults or rely on each user to do it manually by proactively setting > warning modes I prefer the defaults way. > > Remember: I am not advocating staying in the warning mode, I'm just seeing > it as a useful intermediate step for legacy stuff we want to fix. > > - Chris > > Hi Chris, I think PHP is far from targeting a zero cost on version upgrade for projects. There will be other parts that will require testing, whatever you do. Trying to optimize this to reduce the 1 line quick fix that could be easily read in the documentation at https://www.php.net/manual/en/migration81.php sounds to me like we're trying too hard to reduce this cost, ignoring others. Other technical costs would be to not switch earlier to new exception mode as long as the default will cover the cases. I am thinking about this with a legacy system in mind that is long due on exception handling for the database layer. I know that having exceptions by default would spark an interest in developers' minds to do this change sooner rather than later because they will feel the default is the recommended way. Due to bandwidth allocation, they might add the line there, but a task will be created to fix it in the next few months, maybe a year. There will be a cost of upgrading. New scenarios and tests that might not even exist currently, negative flow scenarios. Regards, Alex --000000000000939bea05b9c82b0c--