Skip to content

Commit 3ffd5b4

Browse files
authored
Merge pull request #98 from Art4/97-add-support-for-php-84
Add support for PHP 8.4
2 parents d156fb4 + 165a599 commit 3ffd5b4

File tree

10 files changed

+29
-15
lines changed

10 files changed

+29
-15
lines changed

Diff for: .github/workflows/unit-tests.yml

+10-5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
operating-system: ['ubuntu-latest']
17-
php: ['8.1', '8.2', '8.3', '8.4']
17+
php:
18+
- '8.5'
19+
- '8.4'
20+
- '8.3'
21+
- '8.2'
22+
- '8.1'
1823

1924
steps:
2025
- name: Checkout
@@ -30,11 +35,11 @@ jobs:
3035
tools: none
3136

3237
- name: "Install Composer dependencies"
33-
if: ${{ matrix.php <= '8.3' }}
38+
if: ${{ matrix.php <= '8.4' }}
3439
uses: "ramsey/composer-install@v2"
3540

36-
- name: "Install Composer dependencies (PHP 8.4)"
37-
if: ${{ matrix.php >= '8.4' }}
41+
- name: "Install Composer dependencies (PHP 8.5)"
42+
if: ${{ matrix.php >= '8.5' }}
3843
uses: "ramsey/composer-install@v2"
3944
with:
4045
composer-options: --ignore-platform-reqs
@@ -43,7 +48,7 @@ jobs:
4348
run: composer run phpunit -- --coverage-clover .phpunit.cache/clover.xml
4449

4550
- name: Upload coverage reports to Codecov
46-
if: ${{ success() && matrix.php == '8.3' }}
51+
if: ${{ success() && matrix.php == '8.4' }}
4752
uses: codecov/codecov-action@v3
4853
env:
4954
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Diff for: CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased](https://github.com/Art4/json-api-client/compare/1.2.0...v1.x)
99

10+
### Added
11+
12+
- Add support for PHP 8.4
13+
1014
### Changed
1115

1216
- Dropped support for PHP 7.4 and PHP 8.0

Diff for: composer.json

+8-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
}
1414
],
1515
"require": {
16-
"php": "~8.1.0 || ~8.2.0 || ~8.3.0"
16+
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0"
1717
},
1818
"require-dev": {
1919
"friendsofphp/php-cs-fixer": "^3.40",
@@ -32,12 +32,17 @@
3232
}
3333
},
3434
"scripts": {
35-
"codestyle": "php-cs-fixer fix --verbose --diff",
35+
"codestyle": "php-cs-fixer fix",
3636
"coverage": "phpunit --coverage-html=\".phpunit.cache/code-coverage\"",
3737
"phpstan": "phpstan analyze --memory-limit 512M --configuration .phpstan.neon",
3838
"phpunit": "phpunit",
3939
"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\"",
40-
"reuse-lint": "pipx run reuse --suppress-deprecation lint"
40+
"reuse-lint": "pipx run reuse --suppress-deprecation lint",
41+
"test": [
42+
"@phpstan",
43+
"@phpunit",
44+
"@codestyle --dry-run --diff"
45+
]
4146
},
4247
"config": {
4348
"sort-packages": true

Diff for: tests/BC/AccessableTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function testBcForAccessableInterface(): void
2323
*
2424
* This anonymous class represents an implementation in user code
2525
*/
26-
$class = new class () implements Accessable {
26+
$class = new class implements Accessable {
2727
/**
2828
* Get a value by a key
2929
*

Diff for: tests/BC/Exception/ExceptionTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function testBcForExceptionInterface(): void
2323
*
2424
* This anonymous class represents an implementation in user code
2525
*/
26-
$class = new class () implements Exception {};
26+
$class = new class implements Exception {};
2727

2828
$this->assertInstanceOf(Exception::class, $class);
2929
}

Diff for: tests/BC/FactoryTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function testBcForFactoryInterface(): void
2323
*
2424
* This anonymous class represents an implementation in user code
2525
*/
26-
$class = new class () implements Factory {
26+
$class = new class implements Factory {
2727
/**
2828
* Create a new instance of a class
2929
*

Diff for: tests/BC/Input/InputTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function testBcForInputInterface(): void
2323
*
2424
* This anonymous class represents an implementation in user code
2525
*/
26-
$class = new class () implements Input {
26+
$class = new class implements Input {
2727
/**
2828
* Get the input as simple object
2929
*

Diff for: tests/BC/Input/RequestInputTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function testBcForRequestInputInterface(): void
2323
*
2424
* This anonymous class represents an implementation in user code
2525
*/
26-
$class = new class () implements RequestInput {};
26+
$class = new class implements RequestInput {};
2727

2828
$this->assertInstanceOf(RequestInput::class, $class);
2929
}

Diff for: tests/BC/ManagerTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function testBcForManagerInterface(): void
2424
*
2525
* This anonymous class represents an implementation in user code
2626
*/
27-
$class = new class () implements Manager {
27+
$class = new class implements Manager {
2828
/**
2929
* Parse the input
3030
*

Diff for: tests/BC/Serializer/SerializerTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function testBcForSerializerInterface(): void
2424
*
2525
* This anonymous class represents an implementation in user code
2626
*/
27-
$class = new class () implements Serializer {
27+
$class = new class implements Serializer {
2828
/**
2929
* Serialize data
3030
*

0 commit comments

Comments
 (0)