diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2f1fb9f465..694fa99eab 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -41,7 +41,7 @@ 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" diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index a49e5e7623..de5d674ca5 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" 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: 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';