-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Use EXTENSIONS instead of SKIPIF sections in *.phpt #13276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
Should PHP-8.2 branch be updated for these?
Yeah, I think that's for the better. Although fixes are merged upwards, it's still possible something specific in an older branch breaks while not breaking in a newer branch, so it makes sense to update 8.2+ too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
I like it, thanks for this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Technically this is not a fix unless I'm missing something? Still I'm fine if you wish to target 8.2 as I merge non fixes for tests to reduce potentially conflicts (especially in FPM). Although not sure if it's the case here so might be fine to also target master only...
These 4 tests are skipped if wrong name is used. Interesting is that name "PDO" works on PHP-8.2 but on PHP-8.3+ it is skipped (case sensitive and something was probably changed in run-tests.php along the way). I was thinking of adding only these to PHP-8.2+: diff --git a/ext/dom/tests/libxml_global_state_entity_loader_bypass.phpt b/ext/dom/tests/libxml_global_state_entity_loader_bypass.phpt
index 7fc2a249ac..e47e5d088e 100644
--- a/ext/dom/tests/libxml_global_state_entity_loader_bypass.phpt
+++ b/ext/dom/tests/libxml_global_state_entity_loader_bypass.phpt
@@ -1,10 +1,11 @@
--TEST--
GHSA-3qrf-m4j2-pcrr (libxml global state entity loader bypass)
+--EXTENSIONS--
+libxml
+dom
+zend_test
--SKIPIF--
<?php
-if (!extension_loaded('libxml')) die('skip libxml extension not available');
-if (!extension_loaded('dom')) die('skip dom extension not available');
-if (!extension_loaded('zend-test')) die('skip zend-test extension not available');
if (!function_exists('zend_test_override_libxml_global_state')) die('skip not for Windows');
?>
--FILE--
diff --git a/ext/simplexml/tests/libxml_global_state_entity_loader_bypass.phpt b/ext/simplexml/tests/libxml_global_state_entity_loader_bypass.phpt
index 54f9d4941e..ae5a29913e 100644
--- a/ext/simplexml/tests/libxml_global_state_entity_loader_bypass.phpt
+++ b/ext/simplexml/tests/libxml_global_state_entity_loader_bypass.phpt
@@ -1,10 +1,11 @@
--TEST--
GHSA-3qrf-m4j2-pcrr (libxml global state entity loader bypass)
+--EXTENSIONS--
+libxml
+simplexml
+zend_test
--SKIPIF--
<?php
-if (!extension_loaded('libxml')) die('skip libxml extension not available');
-if (!extension_loaded('simplexml')) die('skip simplexml extension not available');
-if (!extension_loaded('zend-test')) die('skip zend-test extension not available');
if (!function_exists('zend_test_override_libxml_global_state')) die('skip not for Windows');
?>
--FILE--
diff --git a/ext/xmlreader/tests/libxml_global_state_entity_loader_bypass.phpt b/ext/xmlreader/tests/libxml_global_state_entity_loader_bypass.phpt
index cb0297b6b1..a0223367c7 100644
--- a/ext/xmlreader/tests/libxml_global_state_entity_loader_bypass.phpt
+++ b/ext/xmlreader/tests/libxml_global_state_entity_loader_bypass.phpt
@@ -1,10 +1,11 @@
--TEST--
GHSA-3qrf-m4j2-pcrr (libxml global state entity loader bypass)
+--EXTENSIONS--
+libxml
+xmlreader
+zend_test
--SKIPIF--
<?php
-if (!extension_loaded('libxml')) die('skip libxml extension not available');
-if (!extension_loaded('xmlreader')) die('skip xmlreader extension not available');
-if (!extension_loaded('zend-test')) die('skip zend-test extension not available');
if (!function_exists('zend_test_override_libxml_global_state')) die('skip not for Windows');
?>
--FILE--
diff --git a/ext/zend_test/tests/observer_sqlite_create_function.phpt b/ext/zend_test/tests/observer_sqlite_create_function.phpt
index 85d269c9ea..26330043ef 100644
--- a/ext/zend_test/tests/observer_sqlite_create_function.phpt
+++ b/ext/zend_test/tests/observer_sqlite_create_function.phpt
@@ -2,7 +2,7 @@
Observer: PDO::sqliteCreateFunction() can be observed
--EXTENSIONS--
zend_test
-PDO
+pdo
pdo_sqlite
--INI--
zend_test.observer.enabled=1
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please merge into 8.2 and upwards. As the EXTENSIONS section is used for the Windows build to load the non-static extensions.
Ok, then I've added this to PHP-8.2+. Thanks all. |
This changes the SKIPIF to EXTENSIONS in *.phpt.
There are some typos (PDO instead of pdo and zend-test instead of zend_test):
Should PHP-8.2 branch be updated for these?