Skip to content

php 8.5: deprecated PDO constants and functions #6321

Description

@jamieburchell

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions