Repository navigation
Conversation
Provide skipif($condition, $reason) via auto_prepend_file as a clearer
alternative to die('skip ...'). Convert a few tests and replace the
conflicting local skipif() helpers in ext/xml and windows_acls tests.
TimWolla
reviewed
Oct 29, 2026
TimWolla
reviewed
Oct 29, 2026
A predictable name in the shared temp dir let other users plant a file whose code would run in every SKIPIF.
Contributor
Author
|
@TimWolla I applied the comments from review. Thanks for review. What do you think about helper approach? Does it make sense to backport it to 8.4 if it's good idea? |
Member
This is a feature (even if only used internally) and thus acceptable for master only. |
LamentXU123
requested changes
Oct 29, 2026
| return $tb - $ta; | ||
| } | ||
|
|
||
| // Functions available to every SKIPIF section via auto_prepend_file. |
Member
There was a problem hiding this comment.
I think phpdbg SAPI doesn't excute auto_prepend_file?
--TEST--
SKIPIF helper in phpdbg
--SKIPIF--
<?php skipif(true, 'helper works'); ?>
--PHPDBG--
r
q
--FILE--
<?php echo "ok\n"; ?>
--EXPECT--
ok
This doesn't work.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Provide
skipif($condition, $reason)via auto_prepend_file as a clearer alternative todie('skip ...'). Convert a few tests and replace the conflicting local skipif() helpers inext/xmlandwindows_aclstests.I was also thinking about function name
skip_if().This may resolve some of the confusion I had in the past and other contributors across the years: