Re: [RFC]: Change Default mysqli Error Mode
| From: | Christian Schneider | Date: | Mon, 25 Jan 2021 16:25:38 +0000 |
| Subject: | Re: [RFC]: Change Default mysqli Error Mode | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-112988@lists.php.net to get a copy of this message | ||
Am 25.01.2021 um 16:59 schrieb G. P. B. <george.banyard@gmail.com>:
> 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).
That does not change the fact that it is a BC break which should be treated accordingly.
You are basically advocating people should add mysqli_report(MYSQLI_REPORT_OFF) to their setup which
will totally defeat the purpose of the change.
Or (probably more what you have in mind) that they should add mysqli_report(MYSQLI_REPORT_ERROR) now
(to prepare for the change) and switch to MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT later once they
know they are ready.
And this is exactly what I think should be done by the PHP default so people don't have to go
through this manually.
> 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.
This is where you are missing a key component: I want to go through a phase where I will notice
parts where manual error handling (or exception handling after the change) is missing without having
my application abort. This is what warnings are good for.
To some of us this is a very valuable step when upgrading.
- Chris