Skip to content

Commit

Permalink
Merge pull request #249 from phil-davis/php-8.4-for-6.0-branch
Browse files Browse the repository at this point in the history
add PHP 8.3 and 8.4 to CI of 6.0 branch
  • Loading branch information
phil-davis authored Sep 6, 2024
2 parents 34560eb + 82afae9 commit b4b5791
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 9 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,18 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: ['8.0', '8.1', '8.2']
php-versions: ['8.0', '8.1', '8.2', '8.3']
coverage: ['xdebug']
code-style: ['yes']
code-analysis: ['no']
include:
- php-versions: '7.4'
coverage: 'none'
code-style: 'yes'
code-analysis: 'yes'
- php-versions: '8.4'
coverage: 'xdebug'
code-style: 'yes'
code-analysis: 'yes'
steps:
- name: Checkout
Expand Down Expand Up @@ -45,8 +52,8 @@ jobs:
run: composer install --no-progress --prefer-dist --optimize-autoloader

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

- name: Code Analysis (PHPStan)
if: matrix.code-analysis == 'yes'
Expand Down
4 changes: 4 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
$config->setRules([
'@PSR1' => true,
'@Symfony' => true,
'nullable_type_declaration' => [
'syntax' => 'question_mark',
],
'nullable_type_declaration_for_default_null_value' => true,
]);

return $config;
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"sabre/uri" : "^2.3"
},
"require-dev" : {
"friendsofphp/php-cs-fixer": "^3.54",
"phpstan/phpstan": "^1.10",
"friendsofphp/php-cs-fixer": "^3.64",
"phpstan/phpstan": "^1.12",
"phpunit/phpunit" : "^9.6"
},
"suggest" : {
Expand Down Expand Up @@ -50,7 +50,7 @@
"phpstan analyse lib tests"
],
"cs-fixer": [
"php-cs-fixer fix"
"PHP_CS_FIXER_IGNORE_ENV=true php-cs-fixer fix"
],
"phpunit": [
"phpunit --configuration tests/phpunit.xml"
Expand Down
4 changes: 2 additions & 2 deletions lib/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ protected function parseCurlResponse(array $headerLines, string $body, $curlHand
list(
$curlInfo,
$curlErrNo,
$curlErrMsg
$curlErrMsg,
) = $this->curlStuff($curlHandle);

if ($curlErrNo) {
Expand Down Expand Up @@ -532,7 +532,7 @@ protected function parseCurlResult(string $response, $curlHandle): array
list(
$curlInfo,
$curlErrNo,
$curlErrMsg
$curlErrMsg,
) = $this->curlStuff($curlHandle);

if ($curlErrNo) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public function setStatus($status): void
} else {
list(
$statusCode,
$statusText
$statusText,
) = explode(' ', $status, 2);
}
$statusCode = (int) $statusCode;
Expand Down
4 changes: 4 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ parameters:
message: "#^Strict comparison using === between null and array<string, mixed> will always evaluate to false.$#"
count: 1
path: lib/functions.php
-
message: "#^Offset 'value' on array.* in isset\\(\\) always exists and is not nullable.$#"
count: 1
path: lib/functions.php

0 comments on commit b4b5791

Please sign in to comment.