From 8ed258d0d0702a682e2466511cc6e982c309579f Mon Sep 17 00:00:00 2001 From: George Steel Date: Wed, 30 Oct 2024 10:09:59 +0000 Subject: [PATCH] Add support for PHP 8.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also… - Add Roave BC Check to CI - Bump dev deps - Bump CI Actions - Make PHPUnit stricter --- .github/workflows/continuous-integration.yml | 18 +++++++++--------- .laminas-ci.json | 6 ++++++ composer.json | 13 ++++++++----- composer.lock | 4 ++-- phpunit.xml.dist | 4 ++++ 5 files changed, 29 insertions(+), 16 deletions(-) create mode 100644 .laminas-ci.json diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index e808b01..0d2609d 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -18,14 +18,14 @@ jobs: name: PHPUnit Coverage runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4.1.1 - - uses: shivammathur/setup-php@2.30.2 + - uses: actions/checkout@v4 + - uses: shivammathur/setup-php@2.31.1 with: php-version: ${{ env.default_php }} extensions: pcov coverage: pcov ini-values: pcov.enabled=1 - - uses: "ramsey/composer-install@3.0.0" + - uses: ramsey/composer-install@3.0.0 - run: php ./vendor/bin/phpunit --coverage-clover=coverage.xml # Env allows smoke tests to run against a real repository env: @@ -44,13 +44,13 @@ jobs: runs-on: "ubuntu-latest" steps: - - uses: actions/checkout@v4.1.1 - - uses: shivammathur/setup-php@2.30.2 + - uses: actions/checkout@v4 + - uses: shivammathur/setup-php@2.31.1 with: php-version: ${{ env.default_php }} ini-values: memory_limit=-1 extensions: ${{ env.php_extensions }} - - uses: "ramsey/composer-install@3.0.0" + - uses: ramsey/composer-install@3.0.0 with: dependency-versions: "highest" - run: composer global config bin-dir /usr/local/bin @@ -62,12 +62,12 @@ jobs: runs-on: "ubuntu-latest" steps: - - uses: "actions/checkout@v4.1.1" - - uses: "shivammathur/setup-php@2.30.2" + - uses: "actions/checkout@v4" + - uses: shivammathur/setup-php@2.31.1 with: coverage: "xdebug" php-version: ${{ env.default_php }} - - uses: "ramsey/composer-install@3.0.0" + - uses: ramsey/composer-install@3.0.0 with: dependency-versions: "highest" - run: "vendor/bin/infection --configuration=infection-custom.json" diff --git a/.laminas-ci.json b/.laminas-ci.json new file mode 100644 index 0000000..6238f6f --- /dev/null +++ b/.laminas-ci.json @@ -0,0 +1,6 @@ +{ + "ignore_php_platform_requirements": { + "8.4": true + }, + "backwardCompatibilityCheck": true +} diff --git a/composer.json b/composer.json index 1e7f05b..d8ed05c 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ } ], "require": { - "php": "~8.1 || ~8.2.0 || ~8.3", + "php": "~8.1 || ~8.2.0 || ~8.3 || ~8.4", "ext-json": "*", "php-http/discovery": "^1.14.1", "psr/http-client": "^1.0", @@ -26,15 +26,18 @@ "ext-curl": "*", "doctrine/coding-standard": "^12.0", "infection/infection": "^0.27.11", - "laminas/laminas-diactoros": "^3.3.1", + "laminas/laminas-diactoros": "^3.5.0", "php-http/curl-client": "^2.3.2", - "phpunit/phpunit": "^10.5.19", + "phpunit/phpunit": "^10.5.38", "psalm/plugin-phpunit": "^0.19.0", "react/child-process": "^0.6.5", "react/http": "^1.10", "roave/security-advisories": "dev-latest", - "squizlabs/php_codesniffer": "^3.9.1", - "vimeo/psalm": "^5.23.1" + "squizlabs/php_codesniffer": "^3.10.3", + "vimeo/psalm": "^5.26.1" + }, + "conflict": { + "php-http/httplug": "<2.4.1" }, "config": { "sort-packages": true, diff --git a/composer.lock b/composer.lock index c982726..dc88db4 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "74bb9a3cfb575b2d1b5e4ab405105d2b", + "content-hash": "3845dc096edda5747347566367f3f46f", "packages": [ { "name": "php-http/discovery", @@ -7376,7 +7376,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "~8.1 || ~8.2.0 || ~8.3", + "php": "~8.1 || ~8.2.0 || ~8.3 || ~8.4", "ext-json": "*" }, "platform-dev": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index e4c296c..7b6e0bb 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -8,7 +8,11 @@ displayDetailsOnTestsThatTriggerErrors="true" displayDetailsOnTestsThatTriggerNotices="true" displayDetailsOnTestsThatTriggerWarnings="true" + displayDetailsOnPhpunitDeprecations="true" failOnWarning="true" + failOnNotice="true" + failOnDeprecation="true" + failOnPhpunitDeprecation="true" cacheDirectory=".cache/phpunit">