Skip to content

Commit 2c13299

Browse files
committed
PHP 8.1
1 parent 171bae4 commit 2c13299

File tree

5 files changed

+44
-38
lines changed

5 files changed

+44
-38
lines changed

.github/workflows/integrate.yaml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
matrix:
1717
php-version:
18-
- "7.4"
18+
- "8.0"
1919

2020
steps:
2121
- name: "Checkout"
@@ -62,8 +62,8 @@ jobs:
6262
strategy:
6363
matrix:
6464
php-version:
65-
- "7.4"
6665
- "8.0"
66+
- "8.1"
6767

6868
steps:
6969
- name: "Checkout"
@@ -88,13 +88,8 @@ jobs:
8888
restore-keys: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ matrix.dependencies }}-composer-
8989

9090
- name: "Install dependencies"
91-
if: ${{ matrix.php-version != '8.0' }}
9291
run: "composer update --no-interaction --no-progress"
9392

94-
- name: "Install dependencies PHP 8.0"
95-
if: ${{ matrix.php-version == '8.0' }}
96-
run: "composer update --no-interaction --no-progress --ignore-platform-reqs"
97-
9893
- name: "Run tests"
9994
timeout-minutes: 3
10095
run: "vendor/bin/phpunit --no-coverage --no-logging"
@@ -107,7 +102,7 @@ jobs:
107102
strategy:
108103
matrix:
109104
php-version:
110-
- "7.4"
105+
- "8.0"
111106

112107
steps:
113108
- name: "Checkout"
@@ -153,7 +148,7 @@ jobs:
153148
strategy:
154149
matrix:
155150
php-version:
156-
- "7.4"
151+
- "8.0"
157152

158153
steps:
159154
- name: "Checkout"
@@ -191,7 +186,7 @@ jobs:
191186
strategy:
192187
matrix:
193188
php-version:
194-
- "7.4"
189+
- "8.0"
195190

196191
steps:
197192
- name: "Checkout"

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@
1111
}
1212
],
1313
"require": {
14-
"php": "^7.4 || ^8.0"
14+
"php": "~8.0.0 || ~8.1.0"
1515
},
1616
"require-dev": {
1717
"malukenho/mcbumpface": "^1.1.5",
18-
"phpstan/phpstan": "^0.12.86",
19-
"phpstan/phpstan-phpunit": "^0.12.18",
20-
"phpunit/phpunit": "^9.5.4",
21-
"slam/php-cs-fixer-extensions": "^3.0.1",
18+
"phpstan/phpstan": "^1.2.0",
19+
"phpstan/phpstan-phpunit": "^1.0.0",
20+
"phpunit/phpunit": "^9.5.10",
21+
"slam/php-cs-fixer-extensions": "^3.1.0",
2222
"slam/php-debug-r": "^1.7.0",
23-
"slam/phpstan-extensions": "^5.1.0",
24-
"symfony/console": "^5.2.7"
23+
"slam/phpstan-extensions": "^6.0.0",
24+
"symfony/console": "^6.0.1"
2525
},
2626
"extra": {
2727
"mc-bumpface": {

lib/ErrorHandler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -368,16 +368,16 @@ public function emailException(Throwable $exception): void
368368
}
369369

370370
$bodyArray = [
371-
'Data' => \date(\DATE_RFC850),
371+
'Date' => \date(\DATE_RFC850),
372372
'REQUEST_URI' => $_SERVER['REQUEST_URI'] ?? '',
373373
'HTTP_REFERER' => $_SERVER['HTTP_REFERER'] ?? '',
374374
'USER_AGENT' => $_SERVER['HTTP_USER_AGENT'] ?? '',
375375
'REMOTE_ADDR' => $_SERVER['REMOTE_ADDR'] ?? '',
376376
];
377377
if ($this->isCli()) {
378378
$bodyArray = [
379-
'Data' => \date(\DATE_RFC850),
380-
'Comando' => \sprintf('$ php %s', \implode(' ', $_SERVER['argv'])),
379+
'Date' => \date(\DATE_RFC850),
380+
'Command' => \sprintf('$ %s %s', \PHP_BINARY, \implode(' ', $_SERVER['argv'])),
381381
];
382382
}
383383

phpstan-baseline.neon

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
parameters:
2+
ignoreErrors:
3+
-
4+
message: "#^Cannot cast mixed to string\\.$#"
5+
count: 1
6+
path: lib/ErrorHandler.php
7+
8+
-
9+
message: "#^Expression \"\\$arrayPerVerificaErrori\\['undefined_index'\\]\" on a separate line does not do anything\\.$#"
10+
count: 1
11+
path: tests/ErrorHandlerTest.php
12+
13+
-
14+
message: "#^Expression \"@\\$arrayPerVerificaErrori\\['no_exception_thrown_on_undefined_index_now'\\]\" on a separate line does not do anything\\.$#"
15+
count: 1
16+
path: tests/ErrorHandlerTest.php
17+
18+
-
19+
message: "#^Offset 'no_exception_thrown…' does not exist on array\\{\\}\\.$#"
20+
count: 1
21+
path: tests/ErrorHandlerTest.php
22+
23+
-
24+
message: "#^Offset 'undefined_index' does not exist on array\\{\\}\\.$#"
25+
count: 1
26+
path: tests/ErrorHandlerTest.php
27+

phpstan.neon

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,10 @@
11
includes:
2-
- phar://phpstan.phar/conf/config.levelmax.neon
32
- vendor/phpstan/phpstan-phpunit/extension.neon
43
- vendor/slam/phpstan-extensions/conf/slam-rules.neon
4+
- phpstan-baseline.neon
55

66
parameters:
7+
level: max
78
paths:
89
- lib/
910
- tests/
10-
ignoreErrors:
11-
-
12-
message: "#^Expression \"@\\$arrayPerVerificaErrori\\['no_exception_thrown_on_undefined_index_now'\\]\" on a separate line does not do anything\\.$#"
13-
count: 1
14-
path: tests/ErrorHandlerTest.php
15-
-
16-
message: "#^Offset 'no_exception_thrown…' does not exist on array\\(\\)\\.$#"
17-
count: 1
18-
path: tests/ErrorHandlerTest.php
19-
-
20-
message: "#^Expression \"\\$arrayPerVerificaErrori\\['undefined_index'\\]\" on a separate line does not do anything\\.$#"
21-
count: 1
22-
path: tests/ErrorHandlerTest.php
23-
-
24-
message: "#^Offset 'undefined_index' does not exist on array\\(\\)\\.$#"
25-
count: 1
26-
path: tests/ErrorHandlerTest.php

0 commit comments

Comments
 (0)