File affected: core/classes/database/pdo/connection.php
Currently, FuelPHP sets the PDO compression attribute using PDO::MYSQL_ATTR_COMPRESS.
Starting from PHP 8.5, this constant is deprecated and replaced by Pdo\Mysql::ATTR_COMPRESS.
Proposed solution to maintain compatibility with both PHP <=8.4 and PHP 8.5+:
// enable compression if needed
if (!empty($this->_config['connection']['compress']))
{
if (class_exists('\Pdo\Mysql')) {
// PHP 8.5+
$this->_config['attrs'][\Pdo\Mysql::ATTR_COMPRESS] = true;
} elseif (defined('\PDO::MYSQL_ATTR_COMPRESS')) {
// PHP <= 8.4
$this->_config['attrs'][\PDO::MYSQL_ATTR_COMPRESS] = true;
}
}