When SkipCache::checkSkip() checks for "nocache" at the start of skipif output, it will replace all output with an empty string after finding a match. This is problematic given how we implemented skip_if_not_clean, since it always emits "nocache" as its last output on PHP 8.1+. If another skip function is called after skip_if_not_clean, its output will be ignored. That is to say, tests might not be skipped when they otherwise should.
There are several ways to address this:
- Change the order of any SKIPIF blocks in our test suite such that skip_if_not_clean is always called last.
- Change skip_if_not_clean to no longer emit "nocache" directly. Rather, it can set some global flag to disable caching and we can use register_shutdown_function() to conditionally print "nocache" is printed as the final output of a SKIPIF block.
- Change the logic in PHP's run-tests.sh script to no longer discard all SKIPIF output after matching "nocache" at the beginning of the output.
- is related to
-
PHPC-1975 Disable SKIPIF caching for skip_if_not_clean on PHP 8.1
- Closed
- links to