From bdbc7cabe8d1e621e2f5233d90bb55c0c673e89b Mon Sep 17 00:00:00 2001 From: Philipp Reinking Date: Thu, 22 Oct 2026 14:57:19 +0200 Subject: [PATCH] Use Pdo\Mysql::ATTR_SSL_CA on PHP 8.5 to stop the deprecation warning Co-Authored-By: Claude Sonnet 5.5 --- CHANGELOG.md | 4 ++++ config/database.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 861a3f2b..bd0f0f43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ Lines marked **Upgrade step** need you to act after updating. ## [Unreleased] +### Fixed + +- No more PHP 8.5 deprecation warning for the MySQL SSL option on container start. (#298) + ## [2.3.0] - 2026-10-22 All Docker installs should update: the image moves to PHP 8.5.12 for the October 2026 PHP security fixes. This release also rebuilds the form editor as one document. It has 2 upgrade steps, marked **Upgrade step** below. diff --git a/config/database.php b/config/database.php index bd03ac91..eee86f21 100644 --- a/config/database.php +++ b/config/database.php @@ -59,7 +59,7 @@ 'strict' => true, 'engine' => null, 'options' => extension_loaded('pdo_mysql') ? array_filter([ - PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'), + (PHP_VERSION_ID >= 80500 ? \Pdo\Mysql::ATTR_SSL_CA : \PDO::MYSQL_ATTR_SSL_CA) => env('MYSQL_ATTR_SSL_CA'), ]) : [], ], ],