Skip to content

Commit c3328da

Browse files
committed
first
1 parent b5c1568 commit c3328da

File tree

16 files changed

+43
-24
lines changed

16 files changed

+43
-24
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
class (@olegbaturin)
99
- Chg #137: Add separate parameters for each of `HtmlRenderer` settings in constructor. Mark `$settings` parameter as
1010
deprecated (@vjik)
11-
- Enh #138: Raise the minimum PHP version to 8.1 and minor refactoring (@vjik)
11+
- Enh #138: Raise the minimum PHP version to 8.1 and minor refactoring (@vjik)
12+
- Chg #139: Change PHP constraint in `composer.json` to `~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0` (@vjik)
13+
- Bug #139: Explicitly mark nullable parameters (@vjik)
1214

1315
## 3.3.0 July 11, 2024
1416

composer.json

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
}
3232
],
3333
"require": {
34-
"php": "^8.1",
34+
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0",
3535
"ext-dom": "*",
3636
"ext-mbstring": "*",
3737
"alexkart/curl-builder": "^1.0",
@@ -47,14 +47,14 @@
4747
"yiisoft/injector": "^1.0"
4848
},
4949
"require-dev": {
50+
"bamarni/composer-bin-plugin": "^1.8",
5051
"httpsoft/http-message": "^1.1.6",
51-
"maglnet/composer-require-checker": "^4.7.1",
5252
"phpunit/phpunit": "^10.5.44",
5353
"psr/event-dispatcher": "^1.0",
5454
"rector/rector": "^2.0.7",
5555
"roave/infection-static-analysis-plugin": "^1.35",
5656
"spatie/phpunit-watcher": "^1.24",
57-
"vimeo/psalm": "^5.26.1|^6",
57+
"vimeo/psalm": "^5.26.1|^6.2",
5858
"yiisoft/di": "^1.3",
5959
"yiisoft/test-support": "^3.0.1"
6060
},
@@ -69,6 +69,11 @@
6969
}
7070
},
7171
"extra": {
72+
"bamarni-bin": {
73+
"bin-links": true,
74+
"target-directory": "tools",
75+
"forward-command": true
76+
},
7277
"config-plugin-options": {
7378
"source-directory": "config"
7479
},
@@ -80,8 +85,9 @@
8085
"sort-packages": true,
8186
"bump-after-update": "dev",
8287
"allow-plugins": {
83-
"infection/extension-installer": true,
84-
"composer/package-versions-deprecated": true
88+
"bamarni/composer-bin-plugin": true,
89+
"composer/package-versions-deprecated": true,
90+
"infection/extension-installer": true
8591
}
8692
},
8793
"scripts": {

phpunit.xml.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
executionOrder="random"
1010
failOnRisky="true"
1111
failOnWarning="true"
12+
failOnDeprecation="true"
1213
stopOnFailure="false"
1314
colors="true"
1415
displayDetailsOnPhpunitDeprecations="true"

src/ErrorHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ public function __construct(
6262
*/
6363
public function handle(
6464
Throwable $t,
65-
ThrowableRendererInterface $renderer = null,
66-
ServerRequestInterface $request = null
65+
?ThrowableRendererInterface $renderer = null,
66+
?ServerRequestInterface $request = null
6767
): ErrorData {
6868
$renderer ??= $this->defaultRenderer;
6969

src/Renderer/HeaderRenderer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
*/
1515
final class HeaderRenderer implements ThrowableRendererInterface
1616
{
17-
public function render(Throwable $t, ServerRequestInterface $request = null): ErrorData
17+
public function render(Throwable $t, ?ServerRequestInterface $request = null): ErrorData
1818
{
1919
return new ErrorData('', ['X-Error-Message' => self::DEFAULT_ERROR_MESSAGE]);
2020
}
2121

22-
public function renderVerbose(Throwable $t, ServerRequestInterface $request = null): ErrorData
22+
public function renderVerbose(Throwable $t, ?ServerRequestInterface $request = null): ErrorData
2323
{
2424
return new ErrorData('', [
2525
'X-Error-Type' => $t::class,

src/Renderer/HtmlRenderer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,15 +156,15 @@ public function __construct(
156156
?? null;
157157
}
158158

159-
public function render(Throwable $t, ServerRequestInterface $request = null): ErrorData
159+
public function render(Throwable $t, ?ServerRequestInterface $request = null): ErrorData
160160
{
161161
return new ErrorData($this->renderTemplate($this->template, [
162162
'request' => $request,
163163
'throwable' => $t,
164164
]));
165165
}
166166

167-
public function renderVerbose(Throwable $t, ServerRequestInterface $request = null): ErrorData
167+
public function renderVerbose(Throwable $t, ?ServerRequestInterface $request = null): ErrorData
168168
{
169169
return new ErrorData($this->renderTemplate($this->verboseTemplate, [
170170
'request' => $request,

0 commit comments

Comments
 (0)