Am 27.01.2021 um 14:34 schrieb Nikita Popov <nikita....@gmail.com>:
> 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.

Wouldn't this mean everybody would add mysqli_report() to their code?
And wouldn't this render the default of mysqli_report() entirely useless?
Or is your idea that at a later stage you then want to create a warning for 
manual mysqli_report() calls?

> 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).

No, I want to know if I have any code which needs fixing so I can see how I 
want to change those places e.g. a duplicate key from INSERT to REPLACE or 
whatever the correct fix is. Without the code aborting.

Yes, individual developers can switch on mysqli_report(MYSQLI_REPORT_ERROR) 
*now* to get this behavior but I still think this makes more sense as a 
default. Otherwise the temptation is big to just add a global 
mysqli_report(MYSQLI_REPORT_OFF) everywhere just in case.

- Chris

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to