diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a227e3c..9eb6b5a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -96,10 +96,18 @@ jobs: phpunit: '11.0.0' coverage: true experimental: false + - php: '8.3' + phpunit: '12.0.0' + coverage: true + experimental: false - php: '8.4' phpunit: '11.3.6' coverage: true experimental: false + - php: '8.4' + phpunit: '12.0.0' + coverage: true + experimental: false # Experimental builds. - php: 'nightly' @@ -107,12 +115,16 @@ jobs: coverage: false experimental: true - php: 'nightly' - phpunit: 'auto' # PHPUnit 11.x. + phpunit: '^11.5' + coverage: false + experimental: true + - php: 'nightly' + phpunit: 'auto' # PHPUnit 12.x. coverage: false experimental: true - php: 'latest' - phpunit: 'dev-main' # PHPUnit 12.x. + phpunit: 'dev-main' # PHPUnit 12.x/13.x. coverage: false experimental: true @@ -168,6 +180,8 @@ jobs: run: | if [ "${{ matrix.phpunit == 'dev-main' }}" == "true" ]; then echo 'FILE=phpunit10.xml.dist' >> "$GITHUB_OUTPUT" + elif [ "${{ startsWith( steps.phpunit_version.outputs.VERSION, '12.' ) }}" == "true" ]; then + echo 'FILE=phpunit10.xml.dist' >> "$GITHUB_OUTPUT" elif [ "${{ startsWith( steps.phpunit_version.outputs.VERSION, '11.' ) }}" == "true" ]; then echo 'FILE=phpunit10.xml.dist' >> "$GITHUB_OUTPUT" else @@ -287,11 +301,25 @@ jobs: phpunit: '11' coverage: true + # PHPUnit 12 is fully supported for the officially supported PHP versions. + - php: '8.3' + phpunit: '12.0' + - php: '8.3' + phpunit: '12' + coverage: true + - php: '8.4' + phpunit: '12.0' + - php: '8.4' + phpunit: '12' + coverage: true + # Experimental builds. - php: 'nightly' phpunit: '9' - php: 'nightly' phpunit: '11' + - php: 'nightly' + phpunit: '12' name: "PHAR test: PHP ${{ matrix.php }} - PHPUnit: ${{matrix.phpunit}}" @@ -348,7 +376,9 @@ jobs: - name: Determine PHPUnit config id: phpunit_config run: | - if [ "${{ startsWith( steps.phpunit_version.outputs.VERSION, '11.' ) }}" == "true" ]; then + if [ "${{ startsWith( steps.phpunit_version.outputs.VERSION, '12.' ) }}" == "true" ]; then + echo 'FILE=phpunit10.xml.dist' >> "$GITHUB_OUTPUT" + elif [ "${{ startsWith( steps.phpunit_version.outputs.VERSION, '11.' ) }}" == "true" ]; then echo 'FILE=phpunit10.xml.dist' >> "$GITHUB_OUTPUT" else echo 'FILE=phpunit.xml.dist' >> "$GITHUB_OUTPUT" diff --git a/composer.json b/composer.json index 488db00..7c70d13 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ }, "require": { "php": ">=7.1", - "phpunit/phpunit": "^7.5 || ^8.0 || ^9.0 || ^11.0" + "phpunit/phpunit": "^7.5 || ^8.0 || ^9.0 || ^11.0 || ^12.0" }, "require-dev": { "php-parallel-lint/php-console-highlighter": "^1.0.0", @@ -90,7 +90,7 @@ "fix-cs": "Auto-fix code style violations in the PHP files.", "test": "Run the unit tests without code coverage (PHPUnit < 10).", "coverage": "Run the unit tests with code coverage (PHPUnit < 10).", - "test10": "Run the unit tests without code coverage using the PHPUnit 10/11 configuration file.", - "coverage10": "Run the unit tests with code coverage using the PHPUnit 10/11 configuration file." + "test10": "Run the unit tests without code coverage using the PHPUnit 10/11/12 configuration file.", + "coverage10": "Run the unit tests with code coverage using the PHPUnit 10/11/12 configuration file." } }