The SQLite3 extension is still using PHP warnings by default. PDO is using exceptions, like everyone else.
It's time to move to exceptions.
Progressively deprecate warnings (PHP 8.3), make exceptions the default (9.0) and remove warnings (10.0).
In PHP 8.3:
SQLite3Exception
, which extends the Exception
classSQLite3::enableExceptions(true)
throw SQLite3Exception instead of ExceptionSQLite3::enableExceptions(false)
raises E_DEPRECATED
enableExceptions(false)
)In PHP 9.0:
SQLite3Exception
by default, instead of raising warningsSQLite3::enableExceptions(false)
throws an errorSQLite3::enableExceptions(true)
raises E_DEPRECATED
, to alert that the method will get removedIn PHP 10.0:
SQLite3::enableExceptions
methodIn PHP 8.3:
SQLite3::lastErrorCode()
.In PHP 9.0:
In PHP 10.0:
SQLite3::enableExceptions()
will failPHP 8.3, 9.0, 10.0
None.
Only SQLite3.
None that I can think of.
None.
None.
Everything outside of SQLite3 extension.
Assign SQLite3 error constants to SQLite3Exception class, eg. SQLite3Exception::READONLY, see https://www.sqlite.org/rescode.html
Pull request:
After the project is implemented, this section should contain
Voting started 2023-05-09 and has ended end 2023-05-23, Europe/Paris timezone.