Skip to content

Commit

Permalink
Merge pull request #98 from Art4/97-add-support-for-php-84
Browse files Browse the repository at this point in the history
Add support for PHP 8.4
  • Loading branch information
Art4 authored Oct 11, 2024
2 parents d156fb4 + 165a599 commit 3ffd5b4
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 15 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 }}
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 8 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/BC/AccessableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down
2 changes: 1 addition & 1 deletion tests/BC/Exception/ExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/BC/FactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down
2 changes: 1 addition & 1 deletion tests/BC/Input/InputTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down
2 changes: 1 addition & 1 deletion tests/BC/Input/RequestInputTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/BC/ManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down
2 changes: 1 addition & 1 deletion tests/BC/Serializer/SerializerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down

0 comments on commit 3ffd5b4

Please sign in to comment.