From c795c58963cfab67f34112d9fbf945fb6fae3454 Mon Sep 17 00:00:00 2001 From: ignacionelson Date: Fri, 25 Sep 2026 01:59:18 -0300 Subject: [PATCH] Use Pdo\Mysql::ATTR_SSL_CA, which PHP 8.5 no longer warns about PHP 8.5 deprecated PDO::MYSQL_ATTR_SSL_CA, so loading config/database.php printed two "Deprecated" warnings, one for each of the MySQL and MariaDB connections. On a server that displays warnings, they appeared on every page. Pdo\Mysql::ATTR_SSL_CA exists since PHP 8.4, which is our minimum, so no version check is needed. Checked by loading the real config file under PHP 8.5 with pdo_mysql: the old file prints both warnings, and the new one prints none and sets the same option. Reported by @jiits (#1796) --- config/database.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/database.php b/config/database.php index 8910562d..e315c7d3 100644 --- a/config/database.php +++ b/config/database.php @@ -58,7 +58,7 @@ return [ 'strict' => true, 'engine' => null, 'options' => extension_loaded('pdo_mysql') ? array_filter([ - PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), + Pdo\Mysql::ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), ]) : [], ], @@ -78,7 +78,7 @@ return [ 'strict' => true, 'engine' => null, 'options' => extension_loaded('pdo_mysql') ? array_filter([ - PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), + Pdo\Mysql::ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), ]) : [], ],