[php-src] master: Tests: Migrate old extension checks from SKIPIF to EXTENSIONS (#23473)

Weilin Du via GitHub <[email protected]>
Newsgroups gmane.comp.php.cvs.general
Message-ID <[email protected]>
Author: Weilin Du (LamentXU123)
Committer: GitHub (web-flow)
Pusher: TimWolla
Date: 2026-08-27T10:03:30+02:00

Commit: https://github.com/php/php-src/commit/90e374a8353bb469d369bca143d1164bfb30918a
Raw diff: https://github.com/php/php-src/commit/90e374a8353bb469d369bca143d1164bfb30918a.diff

Tests: Migrate old extension checks from SKIPIF to EXTENSIONS (#23473)

Changed paths:
  M  ext/intl/tests/listformatter/listformatter_clone.phpt
  M  ext/mysqli/tests/bug51647.phpt
  M  ext/mysqli/tests/bug55283.phpt
  M  ext/pdo_pgsql/tests/issue78621.phpt
  M  ext/pdo_pgsql/tests/issue78621_closure.phpt
  M  ext/pdo_pgsql/tests/issue78621_method.phpt


Diff:

diff --git a/ext/intl/tests/listformatter/listformatter_clone.phpt b/ext/intl/tests/listformatter/listformatter_clone.phpt
index e80fd4ff4981..929a4067d2e7 100644
--- a/ext/intl/tests/listformatter/listformatter_clone.phpt
+++ b/ext/intl/tests/listformatter/listformatter_clone.phpt
@@ -1,11 +1,7 @@
 --TEST--
 Test IntlListFormatter cannot be cloned
---SKIPIF--
-<?php
-if (!extension_loaded('intl')) {
-    die('skip intl extension not available');
-}
-?>
+--EXTENSIONS--
+intl
 --FILE--
 <?php
 
diff --git a/ext/mysqli/tests/bug51647.phpt b/ext/mysqli/tests/bug51647.phpt
index 7f675c5a1ec2..afd136ddfc22 100644
--- a/ext/mysqli/tests/bug51647.phpt
+++ b/ext/mysqli/tests/bug51647.phpt
@@ -2,6 +2,7 @@
 Bug #51647 (Certificate file without private key (pk in another file) doesn't work)
 --EXTENSIONS--
 mysqli
+openssl
 --SKIPIF--
 <?php
 require_once 'connect.inc';
@@ -9,9 +10,6 @@ require_once 'connect.inc';
 if (!defined('MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT'))
     die("skip Requires MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT");
 
-if (!extension_loaded("openssl"))
-    die("skip PHP streams lack support for SSL. mysqli is compiled to use mysqlnd which uses PHP streams in turn.");
-
 if (!($link = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)))
     die(sprintf("skip Connect failed, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
 
diff --git a/ext/mysqli/tests/bug55283.phpt b/ext/mysqli/tests/bug55283.phpt
index f5473c7c4959..692968f9ee2b 100644
--- a/ext/mysqli/tests/bug55283.phpt
+++ b/ext/mysqli/tests/bug55283.phpt
@@ -2,6 +2,7 @@
 Bug #55283 (SSL options set by mysqli_ssl_set ignored for MySQLi persistent connections)
 --EXTENSIONS--
 mysqli
+openssl
 --SKIPIF--
 <?php
 require_once 'connect.inc';
@@ -9,9 +10,6 @@ require_once 'connect.inc';
 if (!defined('MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT'))
     die("skip Requires MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT");
 
-if (!extension_loaded("openssl"))
-    die("skip PHP streams lack support for SSL. mysqli is compiled to use mysqlnd which uses PHP streams in turn.");
-
 if (!($link = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)))
     die(sprintf("skip Connect failed, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
 
diff --git a/ext/pdo_pgsql/tests/issue78621.phpt b/ext/pdo_pgsql/tests/issue78621.phpt
index 9e14b89cb9e5..2d026493609e 100644
--- a/ext/pdo_pgsql/tests/issue78621.phpt
+++ b/ext/pdo_pgsql/tests/issue78621.phpt
@@ -1,8 +1,10 @@
 --TEST--
 Pdo\Pgsql::setNoticeCallback catches Postgres "raise notice".
+--EXTENSIONS--
+pdo
+pdo_pgsql
 --SKIPIF--
 <?php
-if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded');
 require_once dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
 require_once dirname(__FILE__) . '/config.inc';
 PDOTest::skip();
diff --git a/ext/pdo_pgsql/tests/issue78621_closure.phpt b/ext/pdo_pgsql/tests/issue78621_closure.phpt
index 45ebd1a5fa8b..5b1fc048c4b5 100644
--- a/ext/pdo_pgsql/tests/issue78621_closure.phpt
+++ b/ext/pdo_pgsql/tests/issue78621_closure.phpt
@@ -1,8 +1,10 @@
 --TEST--
 Pdo\Pgsql::setNoticeCallback catches Postgres "raise notice".
+--EXTENSIONS--
+pdo
+pdo_pgsql
 --SKIPIF--
 <?php
-if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded');
 require_once dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
 require_once dirname(__FILE__) . '/config.inc';
 PDOTest::skip();
diff --git a/ext/pdo_pgsql/tests/issue78621_method.phpt b/ext/pdo_pgsql/tests/issue78621_method.phpt
index 2040583bd008..c70a64f18d09 100644
--- a/ext/pdo_pgsql/tests/issue78621_method.phpt
+++ b/ext/pdo_pgsql/tests/issue78621_method.phpt
@@ -1,8 +1,10 @@
 --TEST--
 Pdo\Pgsql::setNoticeCallback catches Postgres "raise notice".
+--EXTENSIONS--
+pdo
+pdo_pgsql
 --SKIPIF--
 <?php
-if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded');
 require_once dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
 require_once dirname(__FILE__) . '/config.inc';
 PDOTest::skip();
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.