Re: [VOTE]: Change Default mysqli Error Mode
| From: | Craig Francis | Date: | Fri, 12 Feb 2021 14:30:52 +0000 |
| Subject: | Re: [VOTE]: Change Default mysqli Error Mode | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-113153@lists.php.net to get a copy of this message | ||
On 12 Feb 2021, at 08:45, Peter Bowyer <phpmailinglists@gmail.com> wrote:
> On Thu, 11 Feb 2021 at 13:31, Christian Schneider <cschneid@cschneid.com> wrote:
>
>> [...] If there would have been an intermediate PHP version with default
>> MYSQLI_REPORT_ERROR I would have voted "Yes", but in the current form I
>> have to say "No".
>>
>
> I voted "No" for the same reasons.
If you want an intermediate PHP version, can it be done via Nikita's solution.
As in, for 8.1, issue a deprecation warning if mysqli_report() hasn't been called before
opening a connection, then change the default to exceptions in 8.2.
This would get everyone (who upgrades to every 0.x) to notice that they haven't specified how
they want reporting to work, and effectively gives them a year to notice and specify that choice.
Switching the default from
OFF to ERROR to ERROR | STRICT
isn't an obvious step, as that still means you're still having a single step to change
from error reporting to exceptions.
Thanks,
Craig