From cf16fcbb9b8107a7df6b97e497fc91e819774d8b Mon Sep 17 00:00:00 2001 From: Filippo Tessarotto Date: Tue, 15 Oct 2024 14:45:19 +0200 Subject: [PATCH] Add PHP 8.4 support for `7.4.x` (#899) --- .github/workflows/ci.yml | 13 +++++++------ composer.json | 18 +++++++++--------- test/Unit/WrapperRunner/WrapperRunnerTest.php | 4 ++-- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad5205cf..a084a1f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: php-version: "${{ matrix.php-version }}" ini-values: "${{ env.INI_VALUES }}" tools: composer-normalize, composer-require-checker - - uses: "ramsey/composer-install@v2" + - uses: "ramsey/composer-install@v3" - run: "composer validate --strict" - run: "composer-normalize --dry-run" @@ -48,7 +48,7 @@ jobs: coverage: "pcov" php-version: "${{ matrix.php-version }}" ini-values: "${{ env.INI_VALUES }}" - - uses: "ramsey/composer-install@v2" + - uses: "ramsey/composer-install@v3" - name: "Lint XMLs" uses: ./.github/lint-xml-configuration @@ -64,6 +64,7 @@ jobs: php-version: - "8.2" - "8.3" + - "8.4" dependencies: - "lowest" - "highest" @@ -75,7 +76,7 @@ jobs: coverage: "pcov" php-version: "${{ matrix.php-version }}" ini-values: "${{ env.INI_VALUES }}" - - uses: "ramsey/composer-install@v2" + - uses: "ramsey/composer-install@v3" with: dependency-versions: "${{ matrix.dependencies }}" @@ -98,7 +99,7 @@ jobs: # coverage: "pcov" # php-version: "${{ matrix.php-version }}" # ini-values: "${{ env.INI_VALUES }}" -# - uses: "ramsey/composer-install@v2" +# - uses: "ramsey/composer-install@v3" # # - name: "Gather base branch for diff" # if: ${{ github.event_name == 'pull_request' }} @@ -134,7 +135,7 @@ jobs: php-version: "${{ matrix.php-version }}" ini-values: "${{ env.INI_VALUES }}" tools: cs2pr - - uses: "ramsey/composer-install@v2" + - uses: "ramsey/composer-install@v3" - run: "vendor/bin/phpcs -q --report=checkstyle | cs2pr" @@ -153,6 +154,6 @@ jobs: coverage: "pcov" php-version: "${{ matrix.php-version }}" ini-values: "${{ env.INI_VALUES }}" - - uses: "ramsey/composer-install@v2" + - uses: "ramsey/composer-install@v3" - run: "vendor/bin/phpstan --memory-limit=512M --ansi --no-progress" diff --git a/composer.json b/composer.json index 2288b45e..3e8d5cdf 100644 --- a/composer.json +++ b/composer.json @@ -33,7 +33,7 @@ } ], "require": { - "php": "~8.2.0 || ~8.3.0", + "php": "~8.2.0 || ~8.3.0 || ~8.4.0", "ext-dom": "*", "ext-pcre": "*", "ext-reflection": "*", @@ -43,21 +43,21 @@ "phpunit/php-code-coverage": "^10.1.16", "phpunit/php-file-iterator": "^4.1.0", "phpunit/php-timer": "^6.0.0", - "phpunit/phpunit": "^10.5.33", + "phpunit/phpunit": "^10.5.36", "sebastian/environment": "^6.1.0", - "symfony/console": "^6.4.7 || ^7.1.4", - "symfony/process": "^6.4.7 || ^7.1.3" + "symfony/console": "^6.4.7 || ^7.1.5", + "symfony/process": "^6.4.7 || ^7.1.5" }, "require-dev": { "ext-pcov": "*", "ext-posix": "*", "doctrine/coding-standard": "^12.0.0", - "phpstan/phpstan": "^1.12.3", - "phpstan/phpstan-deprecation-rules": "^1.2.0", + "phpstan/phpstan": "^1.12.6", + "phpstan/phpstan-deprecation-rules": "^1.2.1", "phpstan/phpstan-phpunit": "^1.4.0", - "phpstan/phpstan-strict-rules": "^1.6.0", - "squizlabs/php_codesniffer": "^3.10.2", - "symfony/filesystem": "^6.4.3 || ^7.1.2" + "phpstan/phpstan-strict-rules": "^1.6.1", + "squizlabs/php_codesniffer": "^3.10.3", + "symfony/filesystem": "^6.4.3 || ^7.1.5" }, "autoload": { "psr-4": { diff --git a/test/Unit/WrapperRunner/WrapperRunnerTest.php b/test/Unit/WrapperRunner/WrapperRunnerTest.php index 5606897f..a1486d6c 100644 --- a/test/Unit/WrapperRunner/WrapperRunnerTest.php +++ b/test/Unit/WrapperRunner/WrapperRunnerTest.php @@ -249,7 +249,7 @@ public function testTeamcityOutput(): void self::assertNotFalse($format); $output = $result->output; - $output = preg_replace("/^Processes: \\d+\nRuntime: PHP \\d+.\\d+.\\d+(-\w+)?\n\n/", '', $output, 1, $count); + $output = preg_replace("/^Processes: \\d+\nRuntime: PHP \\d+\\.\\d+\\.\\w+(-\w+)?\n\n/", '', $output, 1, $count); self::assertSame(1, $count); self::assertNotNull($output); @@ -270,7 +270,7 @@ public function testTestdoxOutput(): void self::assertNotFalse($format); $output = $result->output; - $output = preg_replace("/^Processes: \\d+\nRuntime: PHP \\d+.\\d+.\\d+(-.+)?\n\n/", '', $output, 1, $count); + $output = preg_replace("/^Processes: \\d+\nRuntime: PHP \\d+\\.\\d+\\.\\w+(-.+)?\n\n/", '', $output, 1, $count); self::assertSame(1, $count); self::assertNotNull($output);