php 8.5: deprecated PDO constants and functions
As per upcoming PHP 8.5 deprecations
There are a huge number of driver-specific constants and methods defined on the main PDO class; as examples,
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY,PDO::pgsqlCopyFromArray(). PHP 8.4 introduced driver-specific subclasses of PDO, and all of these are now defined in those subclasses.
PHP 8.5 deprecates usage of the PDO constants and methods in favor of those.
For interested parties there's a preliminary fix in this branch which has been lightly tested with PDO for MySQL (I usually use the mysqli driver). This change will require PHP >= 8.4.
The patch also returns the respective subclass where available, instead of the generic PDO class.
Applied to my fork. Thanks.