Skip to content

Commit 8bcff6b

Browse files
committed
GH Actions: fix build with special set of extensions
There was a special build included which is supposed disable Mbstring and record code coverage, but the `extensions` key was missing from the `setup-php` action runner, so Mbstring was never disabled.... Mind: the original intention was for this build to use a PHP version "in the middle" between the low and high supported PHP versions, hence PHP 7.2. However, updating this now to PHP 8.1 would fail the build as PHP 8.1 would use PHPUnit 9.x, which since PHPUnit 9.3 uses PHP Parser for code coverage, which will break on the tokens polyfilled by PHP_CodeSniffer. So, this MUST be run either on a PHP version still using PHPUnit 8 (= PHP 7.2) or on a PHP version which doesn't polyfill any PHP native tokens (= PHP 8.4). With that in mind, I've left it at PHP 7.2 for now. Another thing to know about this build is that Mbstring is a required extension for PHPUnit, but it is only really needed when PHPUnit is run with the `--testdox` CLI flag. In later PHPUnit versions, this requirement is enforced across the board though, but IIRC we should still be able to run without Mbstring on PHPUnit 8.
1 parent e43f301 commit 8bcff6b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

.github/workflows/unit-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ jobs:
9797
with:
9898
php-version: ${{ matrix.php }}
9999
ini-values: ${{ steps.set_ini.outputs.PHP_INI }}
100+
extensions: ${{ matrix.extensions }}
100101
coverage: ${{ matrix.coverage && 'xdebug' || 'none' }}
101102
tools: cs2pr
102103

0 commit comments

Comments
 (0)