On Mon, 25 Jan 2021 at 15:41, Christian Schneider <cschn...@cschneid.com> wrote:
> Am 21.01.2021 um 23:46 schrieb Kamil Tekiela <tekiela...@gmail.com>: > > In fact, I don't really see this as a major breaking change. If any > project > > really needs the mysqli errors silenced then they can just set the error > > mode back to OFF. The change is aimed at new users, not existing > projects. > > Silenced error reporting was a source of confusion for plenty of > beginners > > who were unaware of the setting. > > > As this definitely is a BC (applications stop running) I think we should > go through a phase were it throws a warning instead of aborting, i.e. > changing it to > mysqli_report(MYSQLI_REPORT_ERROR); > first and change it to throw an exception after a grace period. > > This would be in line with most other newly introduced exceptions for the > default configuration. > Plus this would most certainly help people who host other people's > websites who want to upgrade to PHP 8.x. > > PS: IMHO The same should be (retroactively) done with round() and friends! > > - Chris > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > > 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). 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. The warning mode is literally the worst of both worlds, it doesn't fail on failure so you need to check for failure manually, and you need to suppress the warnings because otherwise you get false negatives. Best regards, George P. Banyard