Den 2021-01-25 kl. 17:25, skrev Christian Schneider:
Am 25.01.2021 um 16:59 schrieb G. P. B. <george.bany...@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
I fully agree on this! Just changing one line of code is not
a good enough justification, since for legacy code that could
be a change that is not needed. Think one should ask if for a
stable released product, changing on line of code incurs cost
for testing and release management. So it's not just about
changing one line of code...
When it comes to warnings vs exceptions for me the main benefit
with warning & grace period is that when migrating legacy code
the timeline is not forced by the application stopping and one
can see all the warnings generated by the app and fixing them.
But of course I fully support the overall strategy on going for
exceptions in Mysli.
r//Björn L
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php