Skip to content

Commit 6112a87

Browse files
authored
PHP 8.4 support (#390)
1 parent 708f482 commit 6112a87

File tree

10 files changed

+22
-19
lines changed

10 files changed

+22
-19
lines changed

.github/workflows/bc.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']
33+
['8.4']

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ jobs:
3131
os: >-
3232
['ubuntu-latest', 'windows-latest']
3333
php: >-
34-
['8.1', '8.2', '8.3']
34+
['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/rector.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ jobs:
2121
os: >-
2222
['ubuntu-latest']
2323
php: >-
24-
['8.3']
24+
['8.4']

.github/workflows/static.yml

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

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
- Enh #384: Make `$config` parameter in `Container` constructor optional (@np25071984)
77
- Enh #324: Make `BuildingException` and `NotFoundException` friendly (@np25071984)
88
- Enh #387: Improve container performance (@samdark)
9+
- Chg #390: Change PHP constraint in `composer.json` to `8.1 - 8.4` (@vjik)
10+
- Bug #390: Explicitly mark nullable parameters (@vjik)
911

1012
## 1.3.0 October 14, 2024
1113

composer.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,23 @@
3232
}
3333
],
3434
"require": {
35-
"php": "^8.1",
35+
"php": "8.1 - 8.4",
3636
"ext-mbstring": "*",
37-
"psr/container": "^1.1|^2.0",
37+
"psr/container": "^1.1 || ^2.0",
3838
"yiisoft/definitions": "^3.0",
3939
"yiisoft/friendly-exception": "^1.1.0"
4040
},
4141
"require-dev": {
42-
"league/container": "^5.0",
43-
"maglnet/composer-require-checker": "^4.2",
44-
"phpbench/phpbench": "^1.2.0",
45-
"phpunit/phpunit": "^10.5",
46-
"rector/rector": "^2.0",
47-
"roave/infection-static-analysis-plugin": "^1.25",
48-
"spatie/phpunit-watcher": "^1.23",
49-
"vimeo/psalm": "^5.26.1",
50-
"yiisoft/injector": "^1.0",
51-
"yiisoft/test-support": "^3.0"
42+
"league/container": "^5.0.1",
43+
"maglnet/composer-require-checker": "^4.7.1",
44+
"phpbench/phpbench": "^1.4.1",
45+
"phpunit/phpunit": "^10.5.45",
46+
"rector/rector": "^2.0.11",
47+
"roave/infection-static-analysis-plugin": "^1.35",
48+
"spatie/phpunit-watcher": "^1.24",
49+
"vimeo/psalm": "^5.26.1 || ^6.10",
50+
"yiisoft/injector": "^1.2",
51+
"yiisoft/test-support": "^3.0.2"
5252
},
5353
"suggest": {
5454
"yiisoft/injector": "^1.0",

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"

src/BuildingException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function __construct(
2323
private readonly string $id,
2424
Throwable $error,
2525
array $buildStack = [],
26-
Throwable $previous = null,
26+
?Throwable $previous = null,
2727
) {
2828
$message = sprintf(
2929
'Caught unhandled error "%s" while building "%s".',

tests/Support/EngineFactory.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function __construct(private readonly ContainerInterface $container)
1616
{
1717
}
1818

19-
public function createByName(string $name = null): EngineInterface
19+
public function createByName(?string $name = null): EngineInterface
2020
{
2121
if ($name === EngineMarkOne::NAME) {
2222
return $this->container->get(EngineMarkOne::class);

0 commit comments

Comments
 (0)