PDO: Support for PDO::ERRMODE_EXCEPTION (PHP8)#394
PDO: Support for PDO::ERRMODE_EXCEPTION (PHP8)#394
Conversation
45c0839 to
8881eb1
Compare
80c861c to
26f2657
Compare
fd45178 to
e6baef8
Compare
|
I think it would be best to do a BC break and add support (only) for |
0efa5c1 to
0bdf956
Compare
|
Since it is backwards compatible, I see no reason not to include it in v4. It can be the default in v5. |
4947fa5 to
04f006a
Compare
|
I don't fully understand why this useful feature is still not integrated after 4 years. Came across a note in my code that works around this shortcoming, just to see nothing has been done here nor in #393 ... now there is Dibi v5 already out which only runs on PHP 8 and that means in default settings this PDO driver will simply not work. See here: https://www.php.net/manual/en/pdo.error-handling.php Because of the private-access props in the driver, there is no way to just tweak the piece of code in the constructor, so one needs to copy the whole driver. 🤦♂️ Seems like releasing a separate package with just the improved PDO driver is the way to go. |
60c2108 to
514bd23
Compare
8157984 to
4ea907a
Compare
013da5d to
c097256
Compare

I added support for PDO in
PDO::ERRMODE_EXCEPTIONerror mode using a single try-catch block.👉 Since in PHP 8
PDO::ERRMODE_EXCEPTIONis the default error mode!