Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112986 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 57084 invoked from network); 25 Jan 2021 16:18:17 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 25 Jan 2021 16:18:17 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 664561804A7 for ; Mon, 25 Jan 2021 07:59:32 -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-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (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 07:59:31 -0800 (PST) Received: by mail-ed1-f46.google.com with SMTP id n6so15951423edt.10 for ; Mon, 25 Jan 2021 07:59:31 -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=k4H6rxPdqH1FXk1biWYA/zW33njxzgSu9dki15PGAQM=; b=fcCwYJikjemhITD87MKOkoeureJoRC3tbZPAtXebXK9bHbCWJTBVSBjkiW8UabTpNc gbE1P3zLeNCutAEvDjnO61pMYOzV/e5rKaTt0ZuveCLb7RiLTx1FDGV+HNgM+4vDj6cS 8uBmaskv4UsIXGPdS1wUb40XAN4RXJGRdbpQHX7BM/m3lykwFL8ab0o7GzxjC6PfbFOP zad4oxFRIBXJzPJ8eozctl9MyCq6UykQySJjzh8Rb/09q/Jv8QawsLIRwbec3/Q7eTlw x5lPh3CDr7fDcxvvhd3pK2Y6xHK4qnA2JPLQDMRb9ODNE22gHpwxjonOpn5irXky7Bzw gcUA== 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=k4H6rxPdqH1FXk1biWYA/zW33njxzgSu9dki15PGAQM=; b=N/UhjqNJLJVgMr9YL2I7pJfdYQDDs+hcSOwDN2Z7kIQ4saDm2jlOCoCURmH/7bPaZd cPJAlpyzRSJZVym8rICcftav7eWlDU0oLQhxEJ/7wTvh5bPqJRMkzPp/4iE6JCiypOy3 oiw82A1MGqkZP473298+iUAOHIb8zrAuFAJPjMrJUlsSJByVg2Bst3KVmSn1x2JIrt49 nqL87WWMXeYw0kx9U4kazGMjmn+OKJ+OAyVaT3fljLlveT77z4Nxv5tIT0hOIw+2qTTF BzdDOKYo7xRjhpQ3h43xUcTWM6FTkrRwfbiqafFLOwYGpfp1Y5CDiS4eW1m6aFuRqPz/ 20/Q== X-Gm-Message-State: AOAM533C7hv1GKS53dwZYDsYt3rEgC+OpIptErOF3cw4i8e7+OSk63ss 8IxweGf4f2o8tzcbHtwvRqFJPmdCX3269bDmxTE= X-Google-Smtp-Source: ABdhPJxJISUbj5UiR7QtYk6nB3km2kGAMPtRteLdOx9dq2pwMMHqn1ZebjgVM4FTrz2qbwCKx0Y8e5NAZhXqnaB6W0M= X-Received: by 2002:aa7:d0cf:: with SMTP id u15mr1017839edo.115.1611590369674; Mon, 25 Jan 2021 07:59:29 -0800 (PST) MIME-Version: 1.0 References: <0edafce4-c9a5-c483-65f1-72e49614135a@telia.com> In-Reply-To: Date: Mon, 25 Jan 2021 15:59:18 +0000 Message-ID: To: Christian Schneider Cc: Kamil Tekiela , PHP internals Content-Type: multipart/alternative; boundary="00000000000082075205b9bb9f06" Subject: Re: [PHP-DEV] [RFC]: Change Default mysqli Error Mode From: george.banyard@gmail.com ("G. P. B.") --00000000000082075205b9bb9f06 Content-Type: text/plain; charset="UTF-8" On Mon, 25 Jan 2021 at 15:41, Christian Schneider wrote: > Am 21.01.2021 um 23:46 schrieb Kamil Tekiela : > > In fact, I don't really see this as a major breaking change. If any > project > > really needs the mysqli errors silenced then they can just set the error > > mode back to OFF. The change is aimed at new users, not existing > projects. > > Silenced error reporting was a source of confusion for plenty of > beginners > > who were unaware of the setting. > > > As this definitely is a BC (applications stop running) I think we should > go through a phase were it throws a warning instead of aborting, i.e. > changing it to > mysqli_report(MYSQLI_REPORT_ERROR); > first and change it to throw an exception after a grace period. > > This would be in line with most other newly introduced exceptions for the > default configuration. > Plus this would most certainly help people who host other people's > websites who want to upgrade to PHP 8.x. > > PS: IMHO The same should be (retroactively) done with round() and friends! > > - Chris > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > > The BC break is totally minimal as it's a one line of code that needs to be added (and for all intent and purposes should already be done). Moreover, I'd rather we get rid of the warning modes all together as they make the least sense to me. Either you're handling the failures explicitly anyway and you use the silent mode, or you don't and want it to throw with the exception mode. The warning mode is literally the worst of both worlds, it doesn't fail on failure so you need to check for failure manually, and you need to suppress the warnings because otherwise you get false negatives. Best regards, George P. Banyard --00000000000082075205b9bb9f06--