Skip to content

Commit a8f497e

Browse files
authored
PHP 8.4 support (#97)
1 parent ebcfec8 commit a8f497e

9 files changed

+28
-32
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ jobs:
3030
os: >-
3131
['ubuntu-latest', 'windows-latest']
3232
php: >-
33-
['8.1', '8.2', '8.3']
33+
['8.1', '8.2', '8.3', '8.4']

.github/workflows/composer-require-checker.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ jobs:
3131
os: >-
3232
['ubuntu-latest']
3333
php: >-
34-
['8.1', '8.2', '8.3']
34+
['8.1', '8.2', '8.3', '8.4']

.github/workflows/mutation.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ jobs:
2727
os: >-
2828
['ubuntu-latest']
2929
php: >-
30-
['8.3']
30+
['8.4']
3131
secrets:
3232
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}

.github/workflows/rector.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
on:
2-
pull_request:
2+
pull_request_target:
33
paths-ignore:
44
- 'docs/**'
55
- 'README.md'
@@ -17,7 +17,8 @@ jobs:
1717
secrets:
1818
token: ${{ secrets.YIISOFT_GITHUB_TOKEN }}
1919
with:
20+
repository: ${{ github.event.pull_request.head.repo.full_name }}
2021
os: >-
2122
['ubuntu-latest']
2223
php: >-
23-
['8.3']
24+
['8.4']

.github/workflows/static.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ jobs:
3030
os: >-
3131
['ubuntu-latest']
3232
php: >-
33-
['8.1', '8.2', '8.3']
33+
['8.1', '8.2', '8.3', '8.4']

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## 2.1.1 under development
44

5-
- no changes in this release.
5+
- Chg #97: Change PHP constraint in `composer.json` to `~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0` (@vjik)
66

77
## 2.1.0 March 03, 2024
88

composer.json

+11-10
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,25 @@
2828
}
2929
],
3030
"require": {
31-
"php": "^8.1",
31+
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0",
3232
"ext-dom": "*",
3333
"psr/http-factory": "^1.0",
34-
"psr/http-message": "^1.0|^2.0",
34+
"psr/http-message": "^1.0 || ^2.0",
3535
"psr/http-server-handler": "^1.0",
3636
"psr/http-server-middleware": "^1.0",
3737
"yiisoft/http": "^1.2",
3838
"yiisoft/json": "^1.0",
3939
"yiisoft/strings": "^2.0"
4040
},
4141
"require-dev": {
42-
"httpsoft/http-message": "^1.0",
43-
"maglnet/composer-require-checker": "^4.7",
44-
"phpunit/phpunit": "^10.5",
45-
"rector/rector": "^2.0",
46-
"roave/infection-static-analysis-plugin": "^1.16",
47-
"spatie/phpunit-watcher": "^1.23",
48-
"vimeo/psalm": "^5.22",
49-
"yiisoft/di": "^1.1"
42+
"httpsoft/http-message": "^1.1.6",
43+
"maglnet/composer-require-checker": "^4.7.1",
44+
"phpunit/phpunit": "^10.5.45",
45+
"rector/rector": "^2.0.9",
46+
"roave/infection-static-analysis-plugin": "^1.35",
47+
"spatie/phpunit-watcher": "^1.24",
48+
"vimeo/psalm": "^5.26.1 || ^6.8.0",
49+
"yiisoft/di": "^1.3"
5050
},
5151
"autoload": {
5252
"psr-4": {
@@ -69,6 +69,7 @@
6969
},
7070
"config": {
7171
"sort-packages": true,
72+
"bump-after-update": "dev",
7273
"allow-plugins": {
7374
"infection/extension-installer": true,
7475
"composer/package-versions-deprecated": true

psalm.xml

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
errorLevel="1"
44
findUnusedBaselineEntry="true"
55
findUnusedCode="false"
6+
ensureOverrideAttribute="false"
67
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
78
xmlns="https://getpsalm.org/schema/config"
89
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"

rector.php

+8-15
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,18 @@
77
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;
88
use Rector\Php81\Rector\Property\ReadOnlyPropertyRector;
99
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
10-
use Rector\Set\ValueObject\LevelSetList;
1110

12-
return static function (RectorConfig $rectorConfig): void {
13-
$rectorConfig->paths([
11+
return RectorConfig::configure()
12+
->withPaths([
1413
__DIR__ . '/src',
1514
__DIR__ . '/tests',
16-
]);
17-
18-
// register a single rule
19-
$rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class);
20-
21-
// define sets of rules
22-
$rectorConfig->sets([
23-
LevelSetList::UP_TO_PHP_81,
24-
]);
25-
26-
$rectorConfig->skip([
15+
])
16+
->withPhpSets(php81: true)
17+
->withRules([
18+
InlineConstructorDefaultToPropertyRector::class,
19+
])
20+
->withSkip([
2721
ClosureToArrowFunctionRector::class,
2822
ReadOnlyPropertyRector::class,
2923
NullToStrictStringFuncCallArgRector::class,
3024
]);
31-
};

0 commit comments

Comments
 (0)