diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ef98d0..7a81e19 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,12 @@ jobs: - name: Install dependencies run: | composer remove --dev phpstan/phpstan - composer require --dev -W "phpunit/phpunit:^9" + # PHPUnit 9 for 8.0 and 8.1 + if [ "${{ matrix.php-version }}" == "8.0" ] || [ "${{ matrix.php-version }}" == "8.1" ]; then composer require --dev -W "phpunit/phpunit:^9.6.34"; fi + # PHPUnit 11 for 8.2 + if [ "${{ matrix.php-version }}" == "8.2" ]; then composer require --dev -W "phpunit/phpunit:^11.5.55"; fi + # PHPUnit 12 for 8.3 8.4 and 8.5 + if [ "${{ matrix.php-version }}" == "8.3" ] || [ "${{ matrix.php-version }}" == "8.4" ] || [ "${{ matrix.php-version }}" == "8.5" ]; then composer require --dev -W "phpunit/phpunit:^12.5.14"; fi composer install --prefer-dist --no-progress --no-interaction --no-scripts mkdir -p build/logs diff --git a/composer.json b/composer.json index fefe9f2..df5fe4f 100644 --- a/composer.json +++ b/composer.json @@ -32,8 +32,8 @@ "firebase/php-jwt": "^7.0" }, "require-dev": { - "phpunit/phpunit": "^4.0|^5.0|^6.0|^7.0|^8.0|^9.0", - "yoast/phpunit-polyfills": "^1.0", + "phpunit/phpunit": "^9.6.34|^10.5.64|^11.5.55|^12.5.14", + "yoast/phpunit-polyfills": "^4.0", "phpstan/phpstan": "^1.4" }, "autoload": {