Re: [RFC]: Change Default mysqli Error Mode

From: Date: Mon, 25 Jan 2021 17:33:23 +0000
Subject: Re: [RFC]: Change Default mysqli Error Mode
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-112992@lists.php.net to get a copy of this message
Am 25.01.2021 um 18:22 schrieb G. P. B. <george.banyard@gmail.com>:
> And yes I'm basically advocating for people to add mysqli_report(MYSQLI_REPORT_ERROR) (or
> even mysqli_report(MYSQLI_REPORT_OFF) if they fancy) to their setup, I'm even advocating for
> them to do it right now such that they can catch anything ahead of time.

Defaults matter. Most people will *not* do this step and their code will fail on upgrade.

> Moreover, this proposal does not prevent you from using the warning mode instead of jumping to
> exceptions directly, the key point is that you need to specify it, and I personally believe that
> having the warning mode as the default mode is the worst choice for the reasons I mentioned
> previously.

Agree to disagree.

If I have the choice to make the smoothen the transition centrally with PHP defaults or rely on each
user to do it manually by proactively setting warning modes I prefer the defaults way.

Remember: I am not advocating staying in the warning mode, I'm just seeing it as a useful
intermediate step for legacy stuff we want to fix.

- Chris



Thread (39 messages)

« previous php.internals (#112992) next »