diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5185516..c676e9b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,12 +21,28 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] + php: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1'] phpunit: ['auto'] coverage: [true] experimental: [false] include: + # By rights, these two PHP versions should be in the base matrix, but, + # for now, they can't be as we can't run these builds with code coverage ON. + # + # Running code coverage on PHPUnit 11.2 and higher is blocked + # as it will fail the build on a PHPUnit native deprecation related to + # the use of `#[CoversClass]` instead of `#[CoversTrait]`. + # @link https://github.com/sebastianbergmann/phpunit/issues/5937 + - php: '8.2' + phpunit: 'auto' + coverage: false + experimental: false + - php: '8.3' + phpunit: 'auto' + coverage: false + experimental: false + # Test against a version on the low-end of the PHPUnit versions supported for each PHP version. # Using the Composer `--prefer-lowest` option is, unfortunately, not viable, as # it would result PHP 7.0 - 7.4 all using PHPUnit 6.4.4, which is not the intention. @@ -82,10 +98,18 @@ jobs: phpunit: '9.3.0' coverage: true experimental: false + - php: '8.2' + phpunit: '~11.1.0' + coverage: true + experimental: false - php: '8.3' phpunit: '10.1.0' coverage: true experimental: false + - php: '8.3' + phpunit: '11.0.0' + coverage: true + experimental: false # Experimental builds. - php: 'nightly' @@ -93,12 +117,16 @@ jobs: coverage: false experimental: true - php: 'nightly' - phpunit: 'auto' # PHPUnit 10.x. + phpunit: '^10.5' + coverage: false + experimental: true + - php: 'nightly' + phpunit: 'auto' # PHPUnit 11.x. coverage: false experimental: true - - php: '8.3' - phpunit: 'dev-main' # PHPUnit 11.x + - php: 'latest' + phpunit: 'dev-main' # PHPUnit 11.x/12.x. coverage: false experimental: true @@ -165,7 +193,7 @@ jobs: echo 'NEEDS_MIGRATION=true' >> $GITHUB_OUTPUT elif [ "${{ steps.phpunit_version.outputs.VERSION }}" == "10.0" ]; then echo 'FILE=phpunit10.xml.dist' >> $GITHUB_OUTPUT - elif [ "${{ startsWith( steps.phpunit_version.outputs.VERSION, '10.' ) }}" == "true" ]; then + elif [ "${{ startsWith( steps.phpunit_version.outputs.VERSION, '10.' ) || startsWith( steps.phpunit_version.outputs.VERSION, '11.' ) }}" == "true" ]; then echo 'FILE=phpunit10.xml.dist' >> $GITHUB_OUTPUT echo 'NEEDS_MIGRATION=true' >> $GITHUB_OUTPUT else @@ -301,11 +329,33 @@ jobs: phpunit: '10' coverage: true + # PHPUnit 11 is fully supported for the officially supported PHP versions. + # + # Running code coverage on PHPUnit 11.2 and higher, however, is blocked for now + # as it will fail the build on a PHPUnit native deprecation related to + # the use of `#[CoversClass]` instead of `#[CoversTrait]`. + # @link https://github.com/sebastianbergmann/phpunit/issues/5937 + - php: '8.2' + phpunit: '11.0' + coverage: true + - php: '8.2' + phpunit: '11' + - php: '8.3' + phpunit: '11.0' + # Temporary build to run code coverage on the highest PHPUnit 11 version on which we still can. + - php: '8.3' + phpunit: '11.1' + coverage: true + - php: '8.3' + phpunit: '11' + # Experimental builds. - php: 'nightly' phpunit: '9' - php: 'nightly' phpunit: '10' + - php: 'nightly' + phpunit: '11' name: "PHAR test: PHP ${{ matrix.php }} - PHPUnit: ${{matrix.phpunit}}" @@ -371,7 +421,7 @@ jobs: run: | if [ "${{ steps.phpunit_version.outputs.VERSION }}" == "10.0" ]; then echo 'FILE=phpunit10.xml.dist' >> $GITHUB_OUTPUT - elif [ "${{ startsWith( steps.phpunit_version.outputs.VERSION, '10.' ) }}" == "true" ]; then + elif [ "${{ startsWith( steps.phpunit_version.outputs.VERSION, '10.' ) || startsWith( steps.phpunit_version.outputs.VERSION, '11.' ) }}" == "true" ]; then echo 'FILE=phpunit10.xml.dist' >> $GITHUB_OUTPUT echo 'NEEDS_MIGRATION=true' >> $GITHUB_OUTPUT else