diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index e070a53..610fedf 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -14,7 +14,12 @@ jobs: fail-fast: false matrix: operating-system: ['ubuntu-latest'] - php: ['8.1', '8.2', '8.3', '8.4'] + php: + - '8.5' + - '8.4' + - '8.3' + - '8.2' + - '8.1' steps: - name: Checkout @@ -30,11 +35,11 @@ jobs: tools: none - name: "Install Composer dependencies" - if: ${{ matrix.php <= '8.3' }} + if: ${{ matrix.php <= '8.4' }} uses: "ramsey/composer-install@v2" - - name: "Install Composer dependencies (PHP 8.4)" - if: ${{ matrix.php >= '8.4' }} + - name: "Install Composer dependencies (PHP 8.5)" + if: ${{ matrix.php >= '8.5' }} uses: "ramsey/composer-install@v2" with: composer-options: --ignore-platform-reqs @@ -43,7 +48,7 @@ jobs: run: composer run phpunit -- --coverage-clover .phpunit.cache/clover.xml - name: Upload coverage reports to Codecov - if: ${{ success() && matrix.php == '8.3' }} + if: ${{ success() && matrix.php == '8.4' }} uses: codecov/codecov-action@v3 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index b22d1ab..f98deba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased](https://github.com/Art4/json-api-client/compare/1.2.0...v1.x) +### Added + +- Add support for PHP 8.4 + ### Changed - Dropped support for PHP 7.4 and PHP 8.0 diff --git a/composer.json b/composer.json index 58a139b..530bfc4 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ } ], "require": { - "php": "~8.1.0 || ~8.2.0 || ~8.3.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3.40", @@ -32,12 +32,17 @@ } }, "scripts": { - "codestyle": "php-cs-fixer fix --verbose --diff", + "codestyle": "php-cs-fixer fix", "coverage": "phpunit --coverage-html=\".phpunit.cache/code-coverage\"", "phpstan": "phpstan analyze --memory-limit 512M --configuration .phpstan.neon", "phpunit": "phpunit", "reuse-annotate": "pipx run reuse annotate src tests --license=\"GPL-3.0-or-later\" --copyright=\"2015-2023 Artur Weigandt https://wlabs.de/kontakt\" --recursive --exclude-year --copyright-style=\"spdx\"", - "reuse-lint": "pipx run reuse --suppress-deprecation lint" + "reuse-lint": "pipx run reuse --suppress-deprecation lint", + "test": [ + "@phpstan", + "@phpunit", + "@codestyle --dry-run --diff" + ] }, "config": { "sort-packages": true diff --git a/tests/BC/AccessableTest.php b/tests/BC/AccessableTest.php index 2a0d12c..41d6852 100644 --- a/tests/BC/AccessableTest.php +++ b/tests/BC/AccessableTest.php @@ -23,7 +23,7 @@ public function testBcForAccessableInterface(): void * * This anonymous class represents an implementation in user code */ - $class = new class () implements Accessable { + $class = new class implements Accessable { /** * Get a value by a key * diff --git a/tests/BC/Exception/ExceptionTest.php b/tests/BC/Exception/ExceptionTest.php index 495427c..dd25c35 100644 --- a/tests/BC/Exception/ExceptionTest.php +++ b/tests/BC/Exception/ExceptionTest.php @@ -23,7 +23,7 @@ public function testBcForExceptionInterface(): void * * This anonymous class represents an implementation in user code */ - $class = new class () implements Exception {}; + $class = new class implements Exception {}; $this->assertInstanceOf(Exception::class, $class); } diff --git a/tests/BC/FactoryTest.php b/tests/BC/FactoryTest.php index 253983f..21fe291 100644 --- a/tests/BC/FactoryTest.php +++ b/tests/BC/FactoryTest.php @@ -23,7 +23,7 @@ public function testBcForFactoryInterface(): void * * This anonymous class represents an implementation in user code */ - $class = new class () implements Factory { + $class = new class implements Factory { /** * Create a new instance of a class * diff --git a/tests/BC/Input/InputTest.php b/tests/BC/Input/InputTest.php index 16664cb..a2645a3 100644 --- a/tests/BC/Input/InputTest.php +++ b/tests/BC/Input/InputTest.php @@ -23,7 +23,7 @@ public function testBcForInputInterface(): void * * This anonymous class represents an implementation in user code */ - $class = new class () implements Input { + $class = new class implements Input { /** * Get the input as simple object * diff --git a/tests/BC/Input/RequestInputTest.php b/tests/BC/Input/RequestInputTest.php index ffc76b9..b503c33 100644 --- a/tests/BC/Input/RequestInputTest.php +++ b/tests/BC/Input/RequestInputTest.php @@ -23,7 +23,7 @@ public function testBcForRequestInputInterface(): void * * This anonymous class represents an implementation in user code */ - $class = new class () implements RequestInput {}; + $class = new class implements RequestInput {}; $this->assertInstanceOf(RequestInput::class, $class); } diff --git a/tests/BC/ManagerTest.php b/tests/BC/ManagerTest.php index 573dfd1..9c993fb 100644 --- a/tests/BC/ManagerTest.php +++ b/tests/BC/ManagerTest.php @@ -24,7 +24,7 @@ public function testBcForManagerInterface(): void * * This anonymous class represents an implementation in user code */ - $class = new class () implements Manager { + $class = new class implements Manager { /** * Parse the input * diff --git a/tests/BC/Serializer/SerializerTest.php b/tests/BC/Serializer/SerializerTest.php index ee82bca..b01a45e 100644 --- a/tests/BC/Serializer/SerializerTest.php +++ b/tests/BC/Serializer/SerializerTest.php @@ -24,7 +24,7 @@ public function testBcForSerializerInterface(): void * * This anonymous class represents an implementation in user code */ - $class = new class () implements Serializer { + $class = new class implements Serializer { /** * Serialize data *