Hi, internals.

I thought about various things to improve the current situation where 
`PDO::ATTR_ERRMODE` is not working very smartly.

Exceptions may be thrown regardless of the setting of `PDO::ATTR_ERRMODE`.
https://www.php.net/manual/en/pdo.rollback.php#refsect1-pdo.rollback-errors

Another annoyance is that `PDO::ERRMODE_SILENT` sometimes gives a warning.
This is an undocumented phenomenon, and it's a 19-year-old vintage bug.
https://github.com/php/php-src/blob/223fb08819967b3063610289a5783944a85d6d65/ext/pdo/pdo_dbh.c#L74

Based on these, I feel that the reliability of the attribute value 
PDO::ATTR_ERRMODE is low and there is not much meaning in its existence as an 
attribute value.

Since the default behavior became `PDO::ERRMODE_EXCEPTION` in PHP8.0.0, I think 
it would be better to abolish it rather than leave it halfway.

I think this is a big change, so I'm assuming 9.x+ even if it's implemented.
I will do the implementation myself.

Please let me know what you think.
Thank you.

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

Reply via email to