From 491027954e24ff3139789a56612794b34aac1a4a Mon Sep 17 00:00:00 2001 From: Ayesh Karunaratne Date: Wed, 6 Dec 2023 11:00:42 +0700 Subject: [PATCH] [PHP 8.3] Add `SQLite3Exception` class Adds the new SQLite3Exception exception class added in PHP 8.3. - [RFC](https://wiki.php.net/rfc/sqlite3_exceptions) - [`SQLite3Exception`](https://www.php.net/manual/en/class.sqlite3exception.php) (TODO) - [PHP 8.3: SQLite3: New `\SQLite3Exception`, deprecations, and changes](https://php.watch/versions/8.3/SQLite3-exception-improvements#class) --- README.md | 1 + src/Php83/README.md | 1 + src/Php83/Resources/stubs/SQLite3Exception.php | 16 ++++++++++++++++ 3 files changed, 18 insertions(+) create mode 100644 src/Php83/Resources/stubs/SQLite3Exception.php diff --git a/README.md b/README.md index 46f9e8314..8bd7d1044 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,7 @@ Polyfills are provided for: - the `ldap_connect_wallet` function introduced in PHP 8.3; - the `stream_context_set_options` function introduced in PHP 8.3; - the `Date*Exception/Error` classes introduced in PHP 8.3; +- the `SQLite3Exception` class introduced in PHP 8.3; It is strongly recommended to upgrade your PHP version and/or install the missing extensions whenever possible. This polyfill should be used only when there is no diff --git a/src/Php83/README.md b/src/Php83/README.md index 92516e7a4..503e753b0 100644 --- a/src/Php83/README.md +++ b/src/Php83/README.md @@ -10,6 +10,7 @@ This component provides features added to PHP 8.3 core: - [`ldap_connect_wallet`](https://wiki.php.net/rfc/deprecate_functions_with_overloaded_signatures) - [`stream_context_set_options`](https://wiki.php.net/rfc/deprecate_functions_with_overloaded_signatures) - [`Date*Exception/Error classes`](https://wiki.php.net/rfc/datetime-exceptions) +- [`SQLite3Exception`](https://wiki.php.net/rfc/sqlite3_exceptions) More information can be found in the [main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md). diff --git a/src/Php83/Resources/stubs/SQLite3Exception.php b/src/Php83/Resources/stubs/SQLite3Exception.php new file mode 100644 index 000000000..ecb7c98e0 --- /dev/null +++ b/src/Php83/Resources/stubs/SQLite3Exception.php @@ -0,0 +1,16 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +if (\PHP_VERSION_ID < 80300) { + class SQLite3Exception extends Exception + { + } +}