From 0a9ba5e35e30a7b9b1ddd91968198539e967e22e Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Thu, 18 Sep 2025 10:23:20 +0200 Subject: [PATCH 1/5] PHPUnit 10.x is compatible with PHP 8.1 Don't downgrade to 9.6.x --- .github/workflows/lint.yml | 4 ++-- .github/workflows/static-analysis.yml | 4 ++-- .github/workflows/tests.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2f1fb9f465..934364ffe8 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -41,14 +41,14 @@ jobs: php-version: "${{ matrix.php-version }}" - name: "Downgrade PHPUnit" - if: matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1' + if: matrix.php-version == '7.4' || matrix.php-version == '8.0' run: "composer require --dev phpunit/phpunit:^9.6 sebastian/diff:^4.0 --update-with-dependencies --ignore-platform-reqs" - name: "Install dependencies" run: "composer install --no-interaction --no-progress" - name: "Transform source code" - if: matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1' + if: matrix.php-version == '7.4' || matrix.php-version == '8.0' run: | composer install --no-interaction --no-progress --working-dir=compiler ./compiler/vendor/bin/simple-downgrade downgrade -c build/downgrade.php ${{ matrix.php-version }} diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index a49e5e7623..bfeeb722ec 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -50,7 +50,7 @@ jobs: extensions: mbstring - name: "Downgrade PHPUnit" - if: matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1' + if: matrix.php-version == '7.4' || matrix.php-version == '8.0' shell: bash run: "composer require --dev phpunit/phpunit:^9.6 sebastian/diff:^4.0 --update-with-dependencies --ignore-platform-reqs" @@ -58,7 +58,7 @@ jobs: run: "composer install --no-interaction --no-progress" - name: "Transform source code" - if: matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1' + if: matrix.php-version == '7.4' || matrix.php-version == '8.0' shell: bash run: | composer install --no-interaction --no-progress --working-dir=compiler diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c431ecee52..6a66bd069d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -32,6 +32,7 @@ jobs: fail-fast: false matrix: php-version: + - "8.1" - "8.2" - "8.3" - "8.4" @@ -159,7 +160,6 @@ jobs: php-version: - "7.4" - "8.0" - - "8.1" operating-system: [ ubuntu-latest, windows-latest ] steps: From a1985aedf3ef0315b5aa8b9f304bb3ab81053584 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Thu, 18 Sep 2025 10:26:08 +0200 Subject: [PATCH 2/5] fix --- .github/workflows/lint.yml | 2 +- .github/workflows/static-analysis.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 934364ffe8..694fa99eab 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -48,7 +48,7 @@ jobs: run: "composer install --no-interaction --no-progress" - name: "Transform source code" - if: matrix.php-version == '7.4' || matrix.php-version == '8.0' + if: matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1' run: | composer install --no-interaction --no-progress --working-dir=compiler ./compiler/vendor/bin/simple-downgrade downgrade -c build/downgrade.php ${{ matrix.php-version }} diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index bfeeb722ec..de5d674ca5 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -58,7 +58,7 @@ jobs: run: "composer install --no-interaction --no-progress" - name: "Transform source code" - if: matrix.php-version == '7.4' || matrix.php-version == '8.0' + if: matrix.php-version == '7.4' || matrix.php-version == '8.0' || matrix.php-version == '8.1' shell: bash run: | composer install --no-interaction --no-progress --working-dir=compiler From 1d0c7165e06c26d5d4caa9df14cb1752c55f6636 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Thu, 18 Sep 2025 10:27:58 +0200 Subject: [PATCH 3/5] Discard changes to .github/workflows/tests.yml --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6a66bd069d..c431ecee52 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -32,7 +32,6 @@ jobs: fail-fast: false matrix: php-version: - - "8.1" - "8.2" - "8.3" - "8.4" @@ -160,6 +159,7 @@ jobs: php-version: - "7.4" - "8.0" + - "8.1" operating-system: [ ubuntu-latest, windows-latest ] steps: From b8d5e75ba37420d1fdca1ddb1dca03bc98f93f3c Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Thu, 18 Sep 2025 10:36:57 +0200 Subject: [PATCH 4/5] fix --- build/ignore-by-php-version.neon.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/ignore-by-php-version.neon.php b/build/ignore-by-php-version.neon.php index e84ddbd635..91b74af9f4 100644 --- a/build/ignore-by-php-version.neon.php +++ b/build/ignore-by-php-version.neon.php @@ -35,7 +35,7 @@ $includes[] = __DIR__ . '/deprecated-8.4.neon'; } -if (PHP_VERSION_ID < 80200) { +if (PHP_VERSION_ID < 80100) { $includes[] = __DIR__ . '/old-phpunit.neon'; } else { $includes[] = __DIR__ . '/new-phpunit.neon'; From 8a621b6000993ecc3aa1840a87ead2c27f66fd99 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Thu, 18 Sep 2025 10:52:39 +0200 Subject: [PATCH 5/5] Update tests.yml --- .github/workflows/tests.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c431ecee52..93b506fcbc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -32,6 +32,7 @@ jobs: fail-fast: false matrix: php-version: + - "8.1" - "8.2" - "8.3" - "8.4" @@ -55,6 +56,14 @@ jobs: - name: "Install dependencies" run: "composer install --no-interaction --no-progress" + - name: "Transform source code" + if: matrix.php-version == '8.1' + shell: bash + run: | + composer install --no-interaction --no-progress --working-dir=compiler + ./compiler/vendor/bin/simple-downgrade downgrade -c build/downgrade.php ${{ matrix.php-version }} + composer dump + - name: "Tests" run: "make tests" @@ -159,7 +168,6 @@ jobs: php-version: - "7.4" - "8.0" - - "8.1" operating-system: [ ubuntu-latest, windows-latest ] steps: