Hi,
I present for discussion an RFC to change the default PDO error mode:
https://wiki.php.net/rfc/pdo_default_errmode
Previous discussion: https://externals.io/message/109015
I believe this change will help new developers who are presently
presented only with knock-on errors, which can be confusing, when using
PDO unless they implement "boilerplate" error handling every time a
query is made.
I believe it also brings the behavior inline with what developers would
actually expect the default to be in modern PHP.
Regards,
AllenJB
Hi there,
I believe it also brings the behavior inline with what developers would actually expect the default to be in modern PHP.
As do I. Every PDO wrapper I've ever written, one of the first things it does is set exceptions as the error mode.
--
Paul M. Jones
pmjones@pmjones.io
http://paul-m-jones.com
Modernizing Legacy Applications in PHP
https://leanpub.com/mlaphp
Solving the N+1 Problem in PHP
https://leanpub.com/sn1php
Hi Allen,
+1 from me. If you need some help with the implementation, pls let me know.
Cheers
Hi,
I present for discussion an RFC to change the default PDO error mode:
https://wiki.php.net/rfc/pdo_default_errmode
Previous discussion: https://externals.io/message/109015
I believe this change will help new developers who are presently
presented only with knock-on errors, which can be confusing, when using
PDO unless they implement "boilerplate" error handling every time a
query is made.I believe it also brings the behavior inline with what developers would
actually expect the default to be in modern PHP.Regards,
AllenJB
--
Matteo Beccati
Development & Consulting - http://www.beccati.com/
Hi,
AllenJB wrote:
I present for discussion an RFC to change the default PDO error mode:
A good thing about this RFC is that if you prefer the traditional error
mode and need to keep that behaviour working in whatever new PHP version
hypothetically implements this RFC, adding the call to set the error
mode will not make your code incompatible with previous PHP versions,
which means it should be tolerable for the authors of libraries or other
software packages. :)
Thanks,
Andrea
Hi all,
A quick "bump" to make sure everyone's seen this RFC amongst all the
other exciting discussions that are going on.
I'm hoping the lack of discussion means this is a boring obvious change
that everyone's going to vote 'yes' to.
With the lack of any raised concerns or issues, I intend to open voting
this weekend.
Regards,
AllenJB
Hi,
I present for discussion an RFC to change the default PDO error mode:
https://wiki.php.net/rfc/pdo_default_errmode
Previous discussion: https://externals.io/message/109015
I believe this change will help new developers who are presently
presented only with knock-on errors, which can be confusing, when
using PDO unless they implement "boilerplate" error handling every
time a query is made.I believe it also brings the behavior inline with what developers
would actually expect the default to be in modern PHP.Regards,
AllenJB