From 3472e1e9fb15b675318693470bcf5377309242e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AD=A6=E7=94=B0=20=E6=86=B2=E5=A4=AA=E9=83=8E?= Date: Tue, 2 Jan 2024 14:43:34 +0900 Subject: [PATCH 1/4] chore: CI workflow to include PHP 8.1, 8.2, and 8.3 --- .github/workflows/ci.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a1371365..1e14724c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,6 @@ jobs: tests: name: Tests runs-on: ubuntu-latest - continue-on-error: ${{ matrix.experimental }} strategy: fail-fast: false matrix: @@ -19,13 +18,9 @@ jobs: - '7.3' - '7.4' - '8.0' - experimental: - - false - include: - - php: "8.1" - composer-options: "--ignore-platform-reqs" - experimental: true - dependencies: "highest" + - '8.1' + - '8.2' + - '8.3' steps: - name: Set up PHP @@ -41,11 +36,11 @@ jobs: - name: "Install lowest dependencies" if: ${{ matrix.dependencies == 'lowest' }} - run: composer update --prefer-lowest --no-interaction --no-progress --no-suggest ${{ matrix.composer-options }} + run: composer update --prefer-lowest --no-interaction --no-progress --no-suggest - name: "Install highest dependencies" if: ${{ matrix.dependencies == 'highest' }} - run: composer update --no-interaction --no-progress --no-suggest ${{ matrix.composer-options }} + run: composer update --no-interaction --no-progress --no-suggest - name: "Run tests" run: ./vendor/bin/phpunit -c phpunit.xml From a0485215eec9e58ff38607c00a448e6858dbfebf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AD=A6=E7=94=B0=20=E6=86=B2=E5=A4=AA=E9=83=8E?= Date: Tue, 2 Jan 2024 15:02:37 +0900 Subject: [PATCH 2/4] chore: change phpunit version according to php --- .github/workflows/ci.yml | 23 +++++++++++++++++++++++ composer.json | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e14724c..f769bd01 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,9 @@ jobs: - '8.1' - '8.2' - '8.3' + include: + - php: '7.2' + phpunit: '"^7||^8"' steps: - name: Set up PHP @@ -33,6 +36,9 @@ jobs: - name: Checkout code uses: actions/checkout@v2 + - name: "Install specific version of phpunit " + if: ${{ matrix.phpunit }} + run: composer require --no-interaction --no-progress --no-suggest phpunit/phpunit:${{ matrix.phpunit }} - name: "Install lowest dependencies" if: ${{ matrix.dependencies == 'lowest' }} @@ -49,6 +55,13 @@ jobs: name: Codestyle check on PHP 7.2 runs-on: ubuntu-latest + strategy: + matrix: + php: + - '7.2' + phpunit: + - '"^7||^8"' + steps: - name: Set up PHP uses: shivammathur/setup-php@2.1.0 @@ -58,6 +71,10 @@ jobs: - name: Checkout code uses: actions/checkout@v2 + - name: "Install specific version of phpunit " + if: ${{ matrix.phpunit }} + run: composer require --no-interaction --no-progress --no-suggest phpunit/phpunit:${{ matrix.phpunit }} + - name: Download dependencies run: composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable @@ -72,6 +89,8 @@ jobs: matrix: php: - '7.2' + phpunit: + - '"^7||^8"' steps: - name: Set up PHP @@ -82,6 +101,10 @@ jobs: - name: Checkout code uses: actions/checkout@v2 + - name: "Install specific version of phpunit " + if: ${{ matrix.phpunit }} + run: composer require --no-interaction --no-progress --no-suggest phpunit/phpunit:${{ matrix.phpunit }} + - name: Download dependencies run: composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable diff --git a/composer.json b/composer.json index 48919f1c..b9cd90bf 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,7 @@ "phpstan/phpstan": "^1", "phpstan/phpstan-phpunit": "^1", "phpstan/phpstan-webmozart-assert": "^1", - "phpunit/phpunit": "^7 || ^8 || ^9", + "phpunit/phpunit": "^9", "symfony/cache": "^5.1" }, "config": { From fdd7d095c8e9968e3ce30eba2a616a70b40ad0b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AD=A6=E7=94=B0=20=E6=86=B2=E5=A4=AA=E9=83=8E?= Date: Tue, 2 Jan 2024 14:51:00 +0900 Subject: [PATCH 3/4] chore: use latest version of GitHub Actions --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f769bd01..5769dace 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,14 +27,14 @@ jobs: steps: - name: Set up PHP - uses: shivammathur/setup-php@2.9.0 + uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} extensions: intl, mbstring tools: "composer:v2" - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: "Install specific version of phpunit " if: ${{ matrix.phpunit }} @@ -64,12 +64,12 @@ jobs: steps: - name: Set up PHP - uses: shivammathur/setup-php@2.1.0 + uses: shivammathur/setup-php@v2 with: php-version: 7.2 - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: "Install specific version of phpunit " if: ${{ matrix.phpunit }} @@ -94,12 +94,12 @@ jobs: steps: - name: Set up PHP - uses: shivammathur/setup-php@2.1.0 + uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: "Install specific version of phpunit " if: ${{ matrix.phpunit }} From c372bc36c342528bda9df4f7a4a1992dd1b57736 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AD=A6=E7=94=B0=20=E6=86=B2=E5=A4=AA=E9=83=8E?= Date: Thu, 4 Jan 2024 11:09:20 +0900 Subject: [PATCH 4/4] fix: scrutinizer ci fail --- .github/workflows/ci.yml | 6 ++++++ composer.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5769dace..575489a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,6 +24,12 @@ jobs: include: - php: '7.2' phpunit: '"^7||^8"' + - php: '8.1' + phpunit: '"^9"' + - php: '8.2' + phpunit: '"^9"' + - php: '8.3' + phpunit: '"^9"' steps: - name: Set up PHP diff --git a/composer.json b/composer.json index b9cd90bf..48919f1c 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,7 @@ "phpstan/phpstan": "^1", "phpstan/phpstan-phpunit": "^1", "phpstan/phpstan-webmozart-assert": "^1", - "phpunit/phpunit": "^9", + "phpunit/phpunit": "^7 || ^8 || ^9", "symfony/cache": "^5.1" }, "config": {