Table of Contents

PHP RFC: Use exceptions by default in SQLite3 extension

Introduction

The SQLite3 extension is still using PHP warnings by default. PDO is using exceptions, like everyone else.

It's time to move to exceptions.

Proposal

Progressively deprecate warnings (PHP 8.3), make exceptions the default (9.0) and remove warnings (10.0).

In PHP 8.3:

In PHP 9.0:

In PHP 10.0:

Backward Incompatible Changes

In PHP 8.3:

In PHP 9.0:

In PHP 10.0:

Proposed PHP Version(s)

PHP 8.3, 9.0, 10.0

RFC Impact

To SAPIs

None.

To Existing Extensions

Only SQLite3.

To Opcache

None that I can think of.

New Constants

None.

php.ini Defaults

None.

Unaffected PHP Functionality

Everything outside of SQLite3 extension.

Future Scope

Assign SQLite3 error constants to SQLite3Exception class, eg. SQLite3Exception::READONLY, see https://www.sqlite.org/rescode.html

Proposed Voting Choices

Patches and Tests

Pull request:

Implementation

After the project is implemented, this section should contain

  1. the version(s) it was merged into
  2. a link to the git commit(s)
  3. a link to the PHP manual entry for the feature
  4. a link to the language specification section (if any)

References

Vote

Voting started 2023-05-09 and has ended end 2023-05-23, Europe/Paris timezone.

Use exceptions by default in SQLite3 extension as described in this RFC?
Real name Yes No
brzuchal (brzuchal)  
bwoebi (bwoebi)  
colinodell (colinodell)  
crell (crell)  
galvao (galvao)  
geekcom (geekcom)  
girgias (girgias)  
heiglandreas (heiglandreas)  
kalle (kalle)  
levim (levim)  
mauricio (mauricio)  
mcmic (mcmic)  
nicolasgrekas (nicolasgrekas)  
nielsdos (nielsdos)  
ocramius (ocramius)  
petk (petk)  
pierrick (pierrick)  
sergey (sergey)  
stas (stas)  
theodorejb (theodorejb)  
villfa (villfa)  
Final result: 21 0
This poll has been closed.