Commit b957f7b8c9e for php
commit b957f7b8c9ec98ee18a652a6e5b9882d7808ec97
Author: Jorg Adam Sowa <jorg.sowa@gmail.com>
Date: Fri Oct 30 11:03:16 2026 +0100
Use --EXTENSIONS-- instead of extension_loaded() skip checks in tests (#25033)
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 9a7c96116e7..dc8ad2c1540 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 568f1f0b5db..73b2f95b2f7 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 77b19832cc0..b092cb763a2 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 2554a46c5a0..420aab5d39d 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 14357a39613..257f8b135c3 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 d56e69b816c..07464eface1 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 cf2a40a339a..9ed0923afc3 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 93f5f48d192..6f5dd32a1e3 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 77062e8e83d..00000000000
--- 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 94fb6ee5d2d..00000000000
--- 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 77512e33719..c69f9114895 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--