Skip to content

Fix php85 mysql attr constant#2405

Merged
MasterOdin merged 2 commits intocakephp:0.xfrom
schlndh:fix-php85MysqlAttrConstant
Mar 14, 2026
Merged

Fix php85 mysql attr constant#2405
MasterOdin merged 2 commits intocakephp:0.xfrom
schlndh:fix-php85MysqlAttrConstant

Conversation

@schlndh
Copy link
Contributor

@schlndh schlndh commented Feb 27, 2026

PHP 8.4 introduced driver-specific PDO subclases (e.g. \PDO\Mysql). PHP 8.5 deprecated \PDO::MYSQL_* (etc) constants.

I'm using phinx with mysql_attr_multi_statements: 0 and on PHP 8.5 I get

PHP Deprecated: Constant PDO::MYSQL_ATTR_MULTI_STATEMENTS is deprecated since 8.5, use Pdo\Mysql::ATTR_MULTI_STATEMENTS instead in vendor/robmorgan/phinx/src/Phinx/Db/Adapter/MysqlAdapter.php on line 154 

This PR should fix it.

I checked the other drivers as well, and the only other one with similar functionality is the SqlServerAdapter. However, that one doesn't seem to have the a PDO subclass.

@schlndh schlndh force-pushed the fix-php85MysqlAttrConstant branch from 878f9c3 to c4a4b2d Compare February 27, 2026 10:17
@schlndh schlndh force-pushed the fix-php85MysqlAttrConstant branch from c4a4b2d to 7f6816e Compare February 27, 2026 10:24
@remluben
Copy link

remluben commented Mar 2, 2026

+1 😄 - I recently ran into these as well. Having this merged would be nice. Many thanks for suggesting the changes.

@MasterOdin MasterOdin merged commit 52f1bc5 into cakephp:0.x Mar 14, 2026
12 checks passed
@schlndh schlndh deleted the fix-php85MysqlAttrConstant branch March 15, 2026 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants