You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Report PHPT test as risky when --SKIPIF-- does not have standard-output side-effect #6000
since #5998 we know which side-effects the PHPT skipif code has.
A skipif condition is expected to output a string starting with "skip", in case the test should be skipped.
this also means a SKIPIF condition which does not at all produce output, can never have a "skipping-effect" on the test-code.
-> we could report a test as "risky" when SKIPIF is declared but does not have such a expected standard output side-effect. I remember we talked about marking such test as "error" instead of "risky", but decided against it because some people use the skipif section to prepare something for the test-case (without the intention to skip it)
--TEST--
PHPT with --SKIPIF-- but without standard output side-effect is risky
--INI--
error_reporting=-1
--SKIPIF--
<?php declare(strict_types=1);
if (1 == 2) {
exit(1);
}
--FILE--
<?php declare(strict_types=1);
echo "Hello, World!\n";
--EXPECT--
Hello, World!
changed the title [-]Report test as risky, if skipif does not has standard-output side-effect[/-][+]Report PHPT test as risky when `--SKIPIF--` does not have standard-output side-effect[/+]on Apr 12, 2026
Activity
[-]Report test as risky, if skipif does not has standard-output side-effect[/-][+]Report PHPT test as risky when `--SKIPIF--` does not have standard-output side-effect[/+]Closes sebastianbergmann#6000