Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113001 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 43976 invoked from network); 27 Jan 2021 13:53:19 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 27 Jan 2021 13:53:19 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 567641804A7 for ; Wed, 27 Jan 2021 05:35:03 -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=-2.1 required=5.0 tests=BAYES_00,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-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (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 05:35:02 -0800 (PST) Received: by mail-lf1-f47.google.com with SMTP id q8so2643965lfm.10 for ; Wed, 27 Jan 2021 05:35:02 -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=otzz3dEOqPOqltQ1eBpDwiNuHkYeEz0AuWbIj7P+4Z4=; b=eY1UGFhwFyFvYDGRXwUx3DHfra1dW38De8CYfrWd2ZdMXiU3xqUTHU2c6lWxuCgP2L AgXWyVS9v5XvdHlobrqWRs5l6caWs+ROcOr2pIOn/4Ve4Wd269yVshtHk6Ll8ose4cnM g2la4BHlTEYlJN2W2NskvukLyNDpDb4ZqSweLLOPLmFyJwTOEWbpGP0OQb8VoYNQQfJc GGYpVTxSmIANb3UUWNl+ME2Vw8v9/GL9VjntIgsG2woAjBphleycchkqcpRCJNlHincu jgmcdnuKOfeR8Tssy1kt5IaORLXv5qlkuv3jH5R9Q9kREbP8tef4y7GL0fdhHjJFrxW4 iVIw== 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=otzz3dEOqPOqltQ1eBpDwiNuHkYeEz0AuWbIj7P+4Z4=; b=o4wznSgz8c2sC+nRZsUxT0EtmZYVcXKwDzVjolRfszLogWaOM9lW+Lzx1UsnA/NCwg NvvEPMRnSwpmCFlO6cty36bC+IaOtcN9+7JEJ9bt0Y/3JV2j8SGmHpoNfl+swwkaR8p2 JHfsicEsdn0uCtLsaPiMYTxSsUoM3bQWchcFNSWQAvAjDLrDb/P/NDjahndnbifsqXmT AhusDP88ZQ7L3AhU15n+3rR6GiDFEy3B8H0Y6V1Ssf96JjyiABTxs3ruAyXwGaGgV/Me 6TgY2k5XnUTcT8VBIbfxMUbk9jocgEoJOiq8fwUdkGHDIaAR8GKGvqvgNG2M3dMnJhiw fNAg== X-Gm-Message-State: AOAM530Jsw+/SXBTFqMjzMm29xEtmo3CCLzK8eCzVYcgPz65E83nsea9 HamHIeWuhoifyw0Hhbw2Ikv9EZd0RXBHOliBsYs= X-Google-Smtp-Source: ABdhPJyXw8J2dL2k4jAYcqNFppoVKTkMotzIxunKvESEdvn0UfPR9nPubT5VTyi/m5ccoHjyICG44n13VyKoQ/hyXTk= X-Received: by 2002:a19:9141:: with SMTP id y1mr5124182lfj.638.1611754501101; Wed, 27 Jan 2021 05:35:01 -0800 (PST) MIME-Version: 1.0 References: <0edafce4-c9a5-c483-65f1-72e49614135a@telia.com> <4D7D042F-39A5-4BEF-93B6-542FD53928A1@cschneid.com> <73C12DD2-D99E-44BA-B557-6043F3DDD4C7@cschneid.com> In-Reply-To: <73C12DD2-D99E-44BA-B557-6043F3DDD4C7@cschneid.com> Date: Wed, 27 Jan 2021 14:34:43 +0100 Message-ID: To: Christian Schneider Cc: =?UTF-8?Q?Alexandru_P=C4=83tr=C4=83nescu?= , PHP internals Content-Type: multipart/alternative; boundary="00000000000080deab05b9e1d6cc" Subject: Re: [PHP-DEV] [RFC]: Change Default mysqli Error Mode From: nikita.ppv@gmail.com (Nikita Popov) --00000000000080deab05b9e1d6cc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jan 26, 2021 at 8:42 AM Christian Schneider wrote: > Am 26.01.2021 um 07:57 schrieb Alexandru P=C4=83tr=C4=83nescu : > > 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 easi= ly > read in the documentation at https://www.php.net/manual/en/migration81.ph= p > sounds to me like we're > trying too hard to reduce this cost, ignoring others. > > The migration guides are already getting quite long, just have a look at > https://www.php.net/manual/de/migration80.incompatible.php < > https://www.php.net/manual/de/migration80.incompatible.php> > "Just one more line" can add up and that's why I want to be able to > proactively fix my code, not fixing it at the time of migration. > > If the error mode would be changed to warnings instead of exceptions firs= t > then every developer interested in best practices could and would already > adapt their code. But they could do it gradually without the disruption o= f > hard fails looming over them. > > I just think giving developers a warning period (per default, not opt-in) > is the right thing to do for BC breaks. [ Did I mention round()? ;-) ] > > I start to sound like a broken record, I'll leave it at that, > - Chris > 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. 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). Regards, Nikita --00000000000080deab05b9e1d6cc--