Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLite3::enableExceptions(false) is deprecated in PHP 8.3 and later #452

Open
ferenclakos opened this issue Dec 28, 2023 · 1 comment
Open

Comments

@ferenclakos
Copy link

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

@dg
Copy link
Owner

dg commented Dec 30, 2023

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.

janpecha added a commit to Tharos/LeanMapper that referenced this issue Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants