Skip to content

Constant PDO::MYSQL_ATTR_INIT_COMMAND is deprecated since 8.5, use Pdo\Mysql::ATTR_INIT_COMMAND instead#237

Description

@rossaddison

No duplicates 馃ゲ.

  • I have searched for a similar issue in our bug tracker and didn't find any solutions.

Describe the bug

Php 8.5 due to be released in a weeks time November 22nd 2025. Testing rossaddison/invoice under 8.5. First php error I have encountered as follows:

Constant PDO::MYSQL_ATTR_INIT_COMMAND is deprecated since 8.5, use Pdo\Mysql::ATTR_INIT_COMMAND instead.

Please create a php8.5 branch and I will fork and issue a pull request to it.

Is this a regression?

No

To Reproduce

Setup rossaddison/invoice running under php8.5

Expected behaviour

A clear run.

Media prove

Stack trace: 
ErrorException: Constant PDO::MYSQL_ATTR_INIT_COMMAND is deprecated since 8.5, use Pdo\Mysql::ATTR_INIT_COMMAND instead in C:\wamp64\www\invoice\vendor\cycle\database\src\Config\MySQL\ConnectionConfig.php:30
Stack trace:
#0 C:\wamp64\www\invoice\vendor\yiisoft\config\src\Config.php(163): [constant expression]()
#1 C:\wamp64\www\invoice\config\common\params.php(389): Yiisoft\Config\Config::{closure:{closure:Yiisoft\Config\Config::buildFile():160}:162}()
#2 C:\wamp64\www\invoice\vendor\yiisoft\config\src\Config.php(173): require('...')
#3 C:\wamp64\www\invoice\vendor\yiisoft\config\src\Config.php(186): Yiisoft\Config\Config::{closure:Yiisoft\Config\Config::buildFile():160}()
#4 C:\wamp64\www\invoice\vendor\yiisoft\config\src\Config.php(116): Yiisoft\Config\Config->buildFile()
#5 C:\wamp64\www\invoice\vendor\yiisoft\config\src\Config.php(111): Yiisoft\Config\Config->buildGroup()
#6 C:\wamp64\www\invoice\vendor\yiisoft\config\src\Config.php(94): Yiisoft\Config\Config->buildGroup()
#7 C:\wamp64\www\invoice\vendor\yiisoft\config\src\Config.php(74): Yiisoft\Config\Config->runBuildParams()
#8 C:\wamp64\www\invoice\vendor\yiisoft\yii-runner\src\ApplicationRunner.php(156): Yiisoft\Config\Config->get()
#9 C:\wamp64\www\invoice\vendor\yiisoft\yii-runner\src\ApplicationRunner.php(189): Yiisoft\Yii\Runner\ApplicationRunner->getConfiguration()
#10 C:\wamp64\www\invoice\vendor\yiisoft\yii-runner\src\ApplicationRunner.php(144): Yiisoft\Yii\Runner\ApplicationRunner->createDefaultContainer()
#11 C:\wamp64\www\invoice\vendor\yiisoft\yii-runner-http\src\HttpApplicationRunner.php(195): Yiisoft\Yii\Runner\ApplicationRunner->getContainer()
#12 C:\wamp64\www\invoice\vendor\yiisoft\yii-runner-http\src\HttpApplicationRunner.php(161): Yiisoft\Yii\Runner\Http\HttpApplicationRunner->runInternal()
#13 C:\wamp64\www\invoice\public\index.php(42): Yiisoft\Yii\Runner\Http\HttpApplicationRunner->run()
#14 {main}

Database

MySQL

Your environment

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions