Skip to content

Commit 53e5973

Browse files
Fixes for PHP 8.4 deprecation
1 parent 0eebc65 commit 53e5973

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

.php-cs-fixer.dist.php

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
->setRules([
66
'@PHP71Migration:risky' => true,
77
'@PHPUnit75Migration:risky' => true,
8+
'@PSR12:risky' => true,
89
'@Symfony' => true,
910
'declare_strict_types' => false,
1011
'global_namespace_import' => false,

src/Command.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Command implements CommandInterface
2525
public function __construct(
2626
$name,
2727
array $args = [],
28-
HandlerStack $handlerStack = null
28+
?HandlerStack $handlerStack = null
2929
) {
3030
$this->name = $name;
3131
$this->data = $args;

src/Exception/CommandException.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ public static function fromPrevious(CommandInterface $command, \Exception $prev)
6363
public function __construct(
6464
$message,
6565
CommandInterface $command,
66-
\Exception $previous = null,
67-
RequestInterface $request = null,
68-
ResponseInterface $response = null
66+
?\Exception $previous = null,
67+
?RequestInterface $request = null,
68+
?ResponseInterface $response = null
6969
) {
7070
$this->command = $command;
7171
$this->request = $request;

src/ServiceClient.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function __construct(
4949
HttpClient $httpClient,
5050
callable $commandToRequestTransformer,
5151
callable $responseToResultTransformer,
52-
HandlerStack $commandHandlerStack = null
52+
?HandlerStack $commandHandlerStack = null
5353
) {
5454
$this->httpClient = $httpClient;
5555
$this->commandToRequestTransformer = $commandToRequestTransformer;

vendor-bin/php-cs-fixer/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"require": {
33
"php": "^7.4 || ^8.0",
4-
"friendsofphp/php-cs-fixer": "3.40.2"
4+
"friendsofphp/php-cs-fixer": "3.52.1"
55
},
66
"config": {
77
"preferred-install": "dist"

0 commit comments

Comments
 (0)