Skip to content

Commit b4b5791

Browse files
authored
Merge pull request #249 from phil-davis/php-8.4-for-6.0-branch
add PHP 8.3 and 8.4 to CI of 6.0 branch
2 parents 34560eb + 82afae9 commit b4b5791

File tree

6 files changed

+24
-9
lines changed

6 files changed

+24
-9
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,18 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
php-versions: ['8.0', '8.1', '8.2']
15+
php-versions: ['8.0', '8.1', '8.2', '8.3']
1616
coverage: ['xdebug']
17+
code-style: ['yes']
1718
code-analysis: ['no']
1819
include:
1920
- php-versions: '7.4'
21+
coverage: 'none'
22+
code-style: 'yes'
23+
code-analysis: 'yes'
24+
- php-versions: '8.4'
25+
coverage: 'xdebug'
26+
code-style: 'yes'
2027
code-analysis: 'yes'
2128
steps:
2229
- name: Checkout
@@ -45,8 +52,8 @@ jobs:
4552
run: composer install --no-progress --prefer-dist --optimize-autoloader
4653

4754
- name: Code Analysis (PHP CS-Fixer)
48-
if: matrix.code-analysis == 'yes'
49-
run: php vendor/bin/php-cs-fixer fix --dry-run --diff
55+
if: matrix.code-style == 'yes'
56+
run: PHP_CS_FIXER_IGNORE_ENV=true php vendor/bin/php-cs-fixer fix --dry-run --diff
5057

5158
- name: Code Analysis (PHPStan)
5259
if: matrix.code-analysis == 'yes'

.php-cs-fixer.dist.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
$config->setRules([
1111
'@PSR1' => true,
1212
'@Symfony' => true,
13+
'nullable_type_declaration' => [
14+
'syntax' => 'question_mark',
15+
],
16+
'nullable_type_declaration_for_default_null_value' => true,
1317
]);
1418

1519
return $config;

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"sabre/uri" : "^2.3"
1414
},
1515
"require-dev" : {
16-
"friendsofphp/php-cs-fixer": "^3.54",
17-
"phpstan/phpstan": "^1.10",
16+
"friendsofphp/php-cs-fixer": "^3.64",
17+
"phpstan/phpstan": "^1.12",
1818
"phpunit/phpunit" : "^9.6"
1919
},
2020
"suggest" : {
@@ -50,7 +50,7 @@
5050
"phpstan analyse lib tests"
5151
],
5252
"cs-fixer": [
53-
"php-cs-fixer fix"
53+
"PHP_CS_FIXER_IGNORE_ENV=true php-cs-fixer fix"
5454
],
5555
"phpunit": [
5656
"phpunit --configuration tests/phpunit.xml"

lib/Client.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ protected function parseCurlResponse(array $headerLines, string $body, $curlHand
475475
list(
476476
$curlInfo,
477477
$curlErrNo,
478-
$curlErrMsg
478+
$curlErrMsg,
479479
) = $this->curlStuff($curlHandle);
480480

481481
if ($curlErrNo) {
@@ -532,7 +532,7 @@ protected function parseCurlResult(string $response, $curlHandle): array
532532
list(
533533
$curlInfo,
534534
$curlErrNo,
535-
$curlErrMsg
535+
$curlErrMsg,
536536
) = $this->curlStuff($curlHandle);
537537

538538
if ($curlErrNo) {

lib/Response.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public function setStatus($status): void
153153
} else {
154154
list(
155155
$statusCode,
156-
$statusText
156+
$statusText,
157157
) = explode(' ', $status, 2);
158158
}
159159
$statusCode = (int) $statusCode;

phpstan.neon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@ parameters:
1818
message: "#^Strict comparison using === between null and array<string, mixed> will always evaluate to false.$#"
1919
count: 1
2020
path: lib/functions.php
21+
-
22+
message: "#^Offset 'value' on array.* in isset\\(\\) always exists and is not nullable.$#"
23+
count: 1
24+
path: lib/functions.php

0 commit comments

Comments
 (0)