Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113014 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 51185 invoked from network); 28 Jan 2021 15:55:39 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 28 Jan 2021 15:55:39 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 701F01804E3 for ; Thu, 28 Jan 2021 07:37:39 -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.6 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,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 v-smtpout3.han.skanova.net (v-smtpout3.han.skanova.net [81.236.60.156]) (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, 28 Jan 2021 07:37:38 -0800 (PST) Received: from [192.168.7.11] ([213.64.245.126]) by cmsmtp with ESMTPA id 59MWlJkuEMkHR59MWlEYoE; Thu, 28 Jan 2021 16:37:36 +0100 To: Kamil Tekiela Cc: Christian Schneider , Nikita Popov , PHP internals References: <0edafce4-c9a5-c483-65f1-72e49614135a@telia.com> <4D7D042F-39A5-4BEF-93B6-542FD53928A1@cschneid.com> <73C12DD2-D99E-44BA-B557-6043F3DDD4C7@cschneid.com> <30C0E1A8-6269-4221-AF21-3FA738D5910C@cschneid.com> <0eb16a55-92d0-7118-57fe-0f3f7d2bc351@telia.com> Message-ID: <3bdf203c-b80d-f5c2-21cd-819697359cda@telia.com> Date: Thu, 28 Jan 2021 16:37:35 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------E5977466D06F9FB2CC9054A6" Content-Language: en-GB X-CMAE-Envelope: MS4wfItvbFw0Ry7Gl0Ht8ACvubaFcf7YsyrCI+9umSzq7uT9WGKwvC/0mXfSt+TolF9zrthzJVb9rNu/4XLkqn7rYTIJv1LIURo6LuimXl85uWbUkBBSi0vN VB/Wjn+N2t4uMd/tfY1PjsB/QCSU4Lafx3JBQRT4BvEO9Y8tatSctMjSj3qDY4i88qjswSfVw/+b3/d0reCJxyRfT5NitFdpzx1XFFFNEiOQUaunXqScWt0v tsvP3YNguiJZiFGGQrkbQPha0Fc82xXLxLhjH7R0PeRVOhh/6s+cEy5Ig83uTLnM Subject: Re: [PHP-DEV] [RFC]: Change Default mysqli Error Mode From: bjorn.x.larsson@telia.com (=?UTF-8?Q?Bj=c3=b6rn_Larsson?=) --------------E5977466D06F9FB2CC9054A6 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Den 2021-01-28 kl. 01:31, skrev Kamil Tekiela: > > I'm missing a thing here when we talk about "your code". I mean on > our > site we have third party libraries. They can typically have a release > schedule on a couple of releases each year. So all code is not up to > us to change. So how does this proposal adress that scenario when it's > not up to us to do the necessary changes? Is it e.g. a blocker to > upgrade to PHP 8.1 with exceptions vs warnings until the library > is updated? > > As a side note I'm at the moment migrating our test site to PHP 8 and > the two most prominent hickups are located in a third party library: > "Undefined array key" and "Attempt to read property "value" on null" > which are warnings. Not sure how it would have been with these as > exceptions, e.g. would the test site stop running and thereby stop > testing of other parts. > > And as I have said earlier, I do like exceptions! It's the migration > aspect I'm wondering about... > > r//Björn L > > > This is a valid concern. I have thought about it for a while and I > think that we should handle this the same way we did with PDO error > mode change. We don't do anything special. > > I really don't see a way that we could make a smoother upgrading > experience. For users that avail of old libraries the onus is on them > to check the library's compatibility with the new PHP version. > Ideally, the change should have been made in PHP 8.0 where it would be > more justifiable to change a default setting. > > The good thing about mysqli error reporting compared to PDO is that > the setting is global. If the library you are using is abandoned or > you can't wait for the library to be updated then you can set the > error reporting level in your own code. The only problem comes when > you want to mix both modes in the same code, but that is a huge code > smell anyway. This means that this change is not a blocker for the > upgrade. > > I think the proposal is good to be implemented in PHP 8.1 as it is > now. But if anyone thinks otherwise or has any ideas on how to improve > I would gladly take it into consideration. If there is any way that we > could make the migration smoother then it would be great. > > Kamil Yes, this proposal would probably have been close to a no-brainer in PHP 8.0. I think the RFC would benefit on expanding on some of the key issues that has been discussed, e.g. the clarification above about migration aspects. /r//Björn L/ --------------E5977466D06F9FB2CC9054A6--