[php-src] master: Use --EXTENSIONS-- instead of extension_loaded() skip checks in tests (#25033)
| From: | Jorg Adam Sowa via GitHub | Date: | Fri, 30 Oct 2026 10:03:19 +0000 |
| Subject: | [php-src] master: Use --EXTENSIONS-- instead of extension_loaded() skip checks in tests (#25033) | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-142994@lists.php.net to get a copy of this message | ||
Author: Jorg Adam Sowa (jorgsowa)
Committer: GitHub (web-flow)
Pusher: jorgsowa
Date: 2026-10-30T11:03:16+01:00
Commit: https://github.com/php/php-src/commit/b957f7b8c9ec98ee18a652a6e5b9882d7808ec97
Raw diff: https://github.com/php/php-src/commit/b957f7b8c9ec98ee18a652a6e5b9882d7808ec97.diff
Use --EXTENSIONS-- instead of extension_loaded() skip checks in tests (#25033)
Changed paths:
D tests/basic/oom_rfc1867_mb_skipif.inc
D tests/basic/oom_rfc1867_session_skipif.inc
M ext/mysqli/tests/ghsa-r6x9-5r99-36j7-cached-sha2-empty.phpt
M ext/mysqli/tests/ghsa-r6x9-5r99-36j7-cached-sha2-fast-auth.phpt
M ext/mysqli/tests/ghsa-r6x9-5r99-36j7-cached-sha2-len.phpt
M ext/mysqli/tests/ghsa-r6x9-5r99-36j7-cached-sha2-switch-unterminated.phpt
M ext/mysqli/tests/ghsa-r6x9-5r99-36j7-sha256-pk-empty.phpt
M ext/mysqli/tests/ghsa-r6x9-5r99-36j7-sha256-pk-len.phpt
M sapi/cli/tests/php_cli_server_expect_100_continue_iua.phpt
M tests/basic/oom_rfc1867_mb_encoding.phpt
M tests/basic/oom_rfc1867_upload_progress.phpt
Diff:
diff --git a/ext/mysqli/tests/ghsa-r6x9-5r99-36j7-cached-sha2-empty.phpt
b/ext/mysqli/tests/ghsa-r6x9-5r99-36j7-cached-sha2-empty.phpt
index 9a7c96116e78..dc8ad2c1540c 100644
--- a/ext/mysqli/tests/ghsa-r6x9-5r99-36j7-cached-sha2-empty.phpt
+++ b/ext/mysqli/tests/ghsa-r6x9-5r99-36j7-cached-sha2-empty.phpt
@@ -2,11 +2,7 @@
GHSA-r6x9-5r99-36j7 (Various packet overreads in mysqlnd_writeprotocol.c - cached sha2 result with
empty packet)
--EXTENSIONS--
mysqli
---SKIPIF--
-<?php
-if (!extension_loaded("openssl"))
- die("skip mysqlnd is built without SSL support, so the caching_sha2_password plugin is not
available");
-?>
+openssl
--FILE--
<?php
require_once 'fake_server.inc';
diff --git a/ext/mysqli/tests/ghsa-r6x9-5r99-36j7-cached-sha2-fast-auth.phpt
b/ext/mysqli/tests/ghsa-r6x9-5r99-36j7-cached-sha2-fast-auth.phpt
index 568f1f0b5dbb..73b2f95b2f7b 100644
--- a/ext/mysqli/tests/ghsa-r6x9-5r99-36j7-cached-sha2-fast-auth.phpt
+++ b/ext/mysqli/tests/ghsa-r6x9-5r99-36j7-cached-sha2-fast-auth.phpt
@@ -2,11 +2,7 @@
GHSA-r6x9-5r99-36j7 (Various packet overreads in mysqlnd_writeprotocol.c - cached sha2 result for a
successful fast auth)
--EXTENSIONS--
mysqli
---SKIPIF--
-<?php
-if (!extension_loaded("openssl"))
- die("skip mysqlnd is built without SSL support, so the caching_sha2_password plugin is not
available");
-?>
+openssl
--FILE--
<?php
require_once 'fake_server.inc';
diff --git a/ext/mysqli/tests/ghsa-r6x9-5r99-36j7-cached-sha2-len.phpt
b/ext/mysqli/tests/ghsa-r6x9-5r99-36j7-cached-sha2-len.phpt
index 77b19832cc02..b092cb763a2e 100644
--- a/ext/mysqli/tests/ghsa-r6x9-5r99-36j7-cached-sha2-len.phpt
+++ b/ext/mysqli/tests/ghsa-r6x9-5r99-36j7-cached-sha2-len.phpt
@@ -2,11 +2,7 @@
GHSA-r6x9-5r99-36j7 (Various packet overreads in mysqlnd_writeprotocol.c - cached sha2 result
shorter than expected)
--EXTENSIONS--
mysqli
---SKIPIF--
-<?php
-if (!extension_loaded("openssl"))
- die("skip mysqlnd is built without SSL support, so the caching_sha2_password plugin is not
available");
-?>
+openssl
--FILE--
<?php
require_once 'fake_server.inc';
diff --git a/ext/mysqli/tests/ghsa-r6x9-5r99-36j7-cached-sha2-switch-unterminated.phpt
b/ext/mysqli/tests/ghsa-r6x9-5r99-36j7-cached-sha2-switch-unterminated.phpt
index 2554a46c5a00..420aab5d39db 100644
--- a/ext/mysqli/tests/ghsa-r6x9-5r99-36j7-cached-sha2-switch-unterminated.phpt
+++ b/ext/mysqli/tests/ghsa-r6x9-5r99-36j7-cached-sha2-switch-unterminated.phpt
@@ -2,11 +2,7 @@
GHSA-r6x9-5r99-36j7 (Various packet overreads in mysqlnd_writeprotocol.c - cached sha2 result with
an unterminated plugin name)
--EXTENSIONS--
mysqli
---SKIPIF--
-<?php
-if (!extension_loaded("openssl"))
- die("skip mysqlnd is built without SSL support, so the caching_sha2_password plugin is not
available");
-?>
+openssl
--FILE--
<?php
require_once 'fake_server.inc';
diff --git a/ext/mysqli/tests/ghsa-r6x9-5r99-36j7-sha256-pk-empty.phpt
b/ext/mysqli/tests/ghsa-r6x9-5r99-36j7-sha256-pk-empty.phpt
index 14357a39613c..257f8b135c38 100644
--- a/ext/mysqli/tests/ghsa-r6x9-5r99-36j7-sha256-pk-empty.phpt
+++ b/ext/mysqli/tests/ghsa-r6x9-5r99-36j7-sha256-pk-empty.phpt
@@ -2,11 +2,7 @@
GHSA-r6x9-5r99-36j7 (Various packet overreads in mysqlnd_writeprotocol.c - sha256 public key
response with empty packet)
--EXTENSIONS--
mysqli
---SKIPIF--
-<?php
-if (!extension_loaded("openssl"))
- die("skip mysqlnd is built without SSL support, so the sha256_password plugin is not
available");
-?>
+openssl
--FILE--
<?php
require_once 'fake_server.inc';
diff --git a/ext/mysqli/tests/ghsa-r6x9-5r99-36j7-sha256-pk-len.phpt
b/ext/mysqli/tests/ghsa-r6x9-5r99-36j7-sha256-pk-len.phpt
index d56e69b816c5..07464eface1e 100644
--- a/ext/mysqli/tests/ghsa-r6x9-5r99-36j7-sha256-pk-len.phpt
+++ b/ext/mysqli/tests/ghsa-r6x9-5r99-36j7-sha256-pk-len.phpt
@@ -2,11 +2,7 @@
GHSA-r6x9-5r99-36j7 (Various packet overreads in mysqlnd_writeprotocol.c - sha256 public key
response shorter than expected)
--EXTENSIONS--
mysqli
---SKIPIF--
-<?php
-if (!extension_loaded("openssl"))
- die("skip mysqlnd is built without SSL support, so the sha256_password plugin is not
available");
-?>
+openssl
--FILE--
<?php
require_once 'fake_server.inc';
diff --git a/sapi/cli/tests/php_cli_server_expect_100_continue_iua.phpt
b/sapi/cli/tests/php_cli_server_expect_100_continue_iua.phpt
index cf2a40a339a7..9ed0923afc35 100644
--- a/sapi/cli/tests/php_cli_server_expect_100_continue_iua.phpt
+++ b/sapi/cli/tests/php_cli_server_expect_100_continue_iua.phpt
@@ -1,9 +1,10 @@
--TEST--
Failure to send "100 Continue" is reported with ignore_user_abort=1
+--EXTENSIONS--
+sockets
--SKIPIF--
<?php
include "skipif.inc";
-if (!extension_loaded("sockets")) die("skip sockets extension required");
if (PHP_OS_FAMILY === "Windows") die("skip SO_LINGER reset behaviour differs on
Windows");
?>
--FILE--
diff --git a/tests/basic/oom_rfc1867_mb_encoding.phpt b/tests/basic/oom_rfc1867_mb_encoding.phpt
index 93f5f48d1923..6f5dd32a1e37 100644
--- a/tests/basic/oom_rfc1867_mb_encoding.phpt
+++ b/tests/basic/oom_rfc1867_mb_encoding.phpt
@@ -1,7 +1,9 @@
--TEST--
rfc1867: mbstring input conversion of a body part doesn't reach the hard limit
+--EXTENSIONS--
+mbstring
--SKIPIF--
-<?php require __DIR__ . "/oom_rfc1867_mb_skipif.inc"; ?>
+<?php require __DIR__ . "/oom_rfc1867_skipif.inc"; ?>
--FILE--
<?php
require __DIR__ . '/oom_rfc1867.inc';
diff --git a/tests/basic/oom_rfc1867_mb_skipif.inc b/tests/basic/oom_rfc1867_mb_skipif.inc
deleted file mode 100644
index 77062e8e83da..000000000000
--- a/tests/basic/oom_rfc1867_mb_skipif.inc
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php
-require __DIR__ . "/oom_rfc1867_skipif.inc";
-if (!extension_loaded('mbstring')) {
- die("skip mbstring not available");
-}
diff --git a/tests/basic/oom_rfc1867_session_skipif.inc b/tests/basic/oom_rfc1867_session_skipif.inc
deleted file mode 100644
index 94fb6ee5d2d7..000000000000
--- a/tests/basic/oom_rfc1867_session_skipif.inc
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php
-require __DIR__ . "/oom_rfc1867_skipif.inc";
-if (!extension_loaded('session')) {
- die("skip session not available");
-}
diff --git a/tests/basic/oom_rfc1867_upload_progress.phpt
b/tests/basic/oom_rfc1867_upload_progress.phpt
index 77512e33719d..c69f91148956 100644
--- a/tests/basic/oom_rfc1867_upload_progress.phpt
+++ b/tests/basic/oom_rfc1867_upload_progress.phpt
@@ -1,8 +1,10 @@
--TEST--
rfc1867: the session upload progress handler doesn't reach the hard limit
+--EXTENSIONS--
+session
--SKIPIF--
<?php
-require __DIR__ . "/oom_rfc1867_session_skipif.inc";
+require __DIR__ . "/oom_rfc1867_skipif.inc";
if (getenv('SKIP_ASAN')) die("skip slow under ASan");
?>
--FILE--