Skip to content

Commit b1a9cd7

Browse files
committed
fix: Replace deprecated MySQL constant with scalar (#237)
1 parent eb08353 commit b1a9cd7

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

src/Config/MySQL/ConnectionConfig.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,16 @@ abstract class ConnectionConfig extends BaseConnectionConfig
2424
* @var array<PDOFlag, mixed>
2525
*/
2626
protected const DEFAULT_PDO_OPTIONS = [
27-
\PDO::ATTR_CASE => \PDO::CASE_NATURAL,
28-
\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION,
29-
// TODO Should be moved into common driver settings.
30-
\PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES "UTF8"',
31-
\PDO::ATTR_STRINGIFY_FETCHES => false,
27+
\PDO::ATTR_CASE => \PDO::CASE_NATURAL,
28+
\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION,
29+
/**
30+
* @see PDO::MYSQL_ATTR_INIT_COMMAND
31+
* @see \Pdo\Mysql::ATTR_INIT_COMMAND
32+
*
33+
* @todo Should be moved into common driver settings?
34+
*/
35+
1002 => 'SET NAMES "UTF8"',
36+
\PDO::ATTR_STRINGIFY_FETCHES => false,
3237
];
3338

3439
/**

0 commit comments

Comments
 (0)