Commit 61e62a4dc9f for php.net
commit 61e62a4dc9f2140745a426559652e031fe6162fa
Author: Peter Kokot <peterkokot@gmail.com>
Date: Tue Apr 28 18:58:51 2026 +0200
Update ext/{pdo_sqlite,sqlite3} tests (#21198)
- Added SKIPIF sections for tests that use Pdo\Sqlite::DETERMINISTIC
as it is available since libsqlite 3.8.3.
- Removed outdated SKIPIF sections for libsqlite versions 3.7.4
When using libsqlite 3.7.17 there are two more failing tests due to
different warning messages:
- ext/sqlite3/tests/sqlite3_38_extended_error.phpt
- ext/sqlite3/tests/sqlite3_39_toggleExtended.phpt
This fix doesn't address these as minimum required libsqlite will be
updated in the future PHP versions anyway at some point and this won't
be an issue anymore then.
diff --git a/ext/pdo_sqlite/tests/pdo_sqlite_createfunction_with_flags.phpt b/ext/pdo_sqlite/tests/pdo_sqlite_createfunction_with_flags.phpt
index 9f0c777e83d..fafa4f6bfa2 100644
--- a/ext/pdo_sqlite/tests/pdo_sqlite_createfunction_with_flags.phpt
+++ b/ext/pdo_sqlite/tests/pdo_sqlite_createfunction_with_flags.phpt
@@ -4,7 +4,7 @@
pdo_sqlite
--SKIPIF--
<?php
-if (!defined('Pdo\Sqlite::DETERMINISTIC')) die('skip system sqlite is too old');
+if (!defined('Pdo\Sqlite::DETERMINISTIC')) die('skip Pdo\Sqlite::DETERMINISTIC requires SQLite library >= 3.8.3');
?>
--FILE--
<?php
diff --git a/ext/pdo_sqlite/tests/php_8.5_deprecations.phpt b/ext/pdo_sqlite/tests/php_8.5_deprecations.phpt
index e8e0b34141c..f7aa61206f6 100644
--- a/ext/pdo_sqlite/tests/php_8.5_deprecations.phpt
+++ b/ext/pdo_sqlite/tests/php_8.5_deprecations.phpt
@@ -2,6 +2,10 @@
PDO_sqlite: PHP 8.5 deprecations
--EXTENSIONS--
pdo_sqlite
+--SKIPIF--
+<?php
+if (!defined('Pdo\Sqlite::DETERMINISTIC')) die('skip Pdo\Sqlite::DETERMINISTIC requires SQLite library >= 3.8.3');
+?>
--FILE--
<?php
diff --git a/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_constants.phpt b/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_constants.phpt
index d1db58b1323..f258dd2a504 100644
--- a/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_constants.phpt
+++ b/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_constants.phpt
@@ -2,6 +2,10 @@
PDO_sqlite: Testing constants exist
--EXTENSIONS--
pdo_sqlite
+--SKIPIF--
+<?php
+if (!defined('Pdo\Sqlite::DETERMINISTIC')) die('skip Pdo\Sqlite::DETERMINISTIC requires SQLite library >= 3.8.3');
+?>
--FILE--
<?php
diff --git a/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_createfunction_with_flags.phpt b/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_createfunction_with_flags.phpt
index 5178daefa6d..07359a69bc4 100644
--- a/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_createfunction_with_flags.phpt
+++ b/ext/pdo_sqlite/tests/subclasses/pdo_sqlite_createfunction_with_flags.phpt
@@ -4,7 +4,7 @@
pdo_sqlite
--SKIPIF--
<?php
-if (!defined('Pdo\Sqlite::DETERMINISTIC')) die('skip system sqlite is too old');
+if (!defined('Pdo\Sqlite::DETERMINISTIC')) die('skip Pdo\Sqlite::DETERMINISTIC requires SQLite library >= 3.8.3');
?>
--FILE--
<?php
diff --git a/ext/pdo_sqlite/tests/subclasses/pdosqlite_001.phpt b/ext/pdo_sqlite/tests/subclasses/pdosqlite_001.phpt
index 52233745820..40ec0a7799f 100644
--- a/ext/pdo_sqlite/tests/subclasses/pdosqlite_001.phpt
+++ b/ext/pdo_sqlite/tests/subclasses/pdosqlite_001.phpt
@@ -2,6 +2,10 @@
Pdo\Sqlite basic
--EXTENSIONS--
pdo_sqlite
+--SKIPIF--
+<?php
+if (!defined('Pdo\Sqlite::DETERMINISTIC')) die('skip Pdo\Sqlite::DETERMINISTIC requires SQLite library >= 3.8.3');
+?>
--FILE--
<?php
diff --git a/ext/pdo_sqlite/tests/subclasses/pdosqlite_002.phpt b/ext/pdo_sqlite/tests/subclasses/pdosqlite_002.phpt
index f2de79b6c84..fddf2138f84 100644
--- a/ext/pdo_sqlite/tests/subclasses/pdosqlite_002.phpt
+++ b/ext/pdo_sqlite/tests/subclasses/pdosqlite_002.phpt
@@ -2,6 +2,10 @@
Pdo\Sqlite create through PDO::connect and function define.
--EXTENSIONS--
pdo_sqlite
+--SKIPIF--
+<?php
+if (!defined('Pdo\Sqlite::DETERMINISTIC')) die('skip Pdo\Sqlite::DETERMINISTIC requires SQLite library >= 3.8.3');
+?>
--FILE--
<?php
diff --git a/ext/sqlite3/tests/sqlite3_35_stmt_readonly.phpt b/ext/sqlite3/tests/sqlite3_35_stmt_readonly.phpt
index 49f029d5854..e07d5b73e99 100644
--- a/ext/sqlite3/tests/sqlite3_35_stmt_readonly.phpt
+++ b/ext/sqlite3/tests/sqlite3_35_stmt_readonly.phpt
@@ -2,13 +2,6 @@
SQLite3_stmt::readOnly check
--EXTENSIONS--
sqlite3
---SKIPIF--
-<?php
-$version = SQLite3::version();
-if ($version['versionNumber'] < 3007004) {
- die("skip");
-}
-?>
--FILE--
<?php
diff --git a/ext/sqlite3/tests/sqlite3_37_createfunction_flags.phpt b/ext/sqlite3/tests/sqlite3_37_createfunction_flags.phpt
index 962075bf147..c9762a11e15 100644
--- a/ext/sqlite3/tests/sqlite3_37_createfunction_flags.phpt
+++ b/ext/sqlite3/tests/sqlite3_37_createfunction_flags.phpt
@@ -4,7 +4,7 @@
sqlite3
--SKIPIF--
<?php
-if (!defined('SQLITE3_DETERMINISTIC')) die('skip system sqlite is too old');
+if (!defined('SQLITE3_DETERMINISTIC')) die('skip SQLITE3_DETERMINISTIC requires SQLite library >= 3.8.3');
?>
--FILE--
<?php
diff --git a/ext/sqlite3/tests/sqlite3_stmt_busy.phpt b/ext/sqlite3/tests/sqlite3_stmt_busy.phpt
index 33eb759772b..eb278561b57 100644
--- a/ext/sqlite3/tests/sqlite3_stmt_busy.phpt
+++ b/ext/sqlite3/tests/sqlite3_stmt_busy.phpt
@@ -2,11 +2,6 @@
SQLite3_stmt::busy
--EXTENSIONS--
sqlite3
---SKIPIF--
-<?php
-$version = SQLite3::version();
-if ($version['versionNumber'] < 3007004) die("skip");
-?>
--FILE--
<?php