dibi
dibi copied to clipboard
SQLite3::enableExceptions(false) is deprecated in PHP 8.3 and later
Version: 5.0.1 PHP: 8.3.1
Bug Description
I get a warning message when I use SQLite driver.
Deprecated: SQLite3::enableExceptions(): Use of warnings for SQLite3 is deprecated in
.../vendor/dibi/dibi/src/Dibi/Drivers/SqliteDriver.php on line 60
Steps To Reproduce
$connection = new Connection([
'driver' => 'sqlite',
'database' => 'example.s3db',
]);
More Information
- https://php.watch/versions/8.3/SQLite3-exception-improvements#enableExceptions-deprecated
If I understand correctly, SQLite only throws exceptions since PHP 8.3. This means that we need to modify Dibi\Drivers\SqliteDriver. First, in __construct it must activate exceptions for older PHP versions. And then catch and handle them in query(). I will be glad for PR.