Skip to content

Commit

Permalink
Fixes for PHP 8.4 deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell committed Mar 31, 2024
1 parent 0eebc65 commit 53e5973
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
->setRules([
'@PHP71Migration:risky' => true,
'@PHPUnit75Migration:risky' => true,
'@PSR12:risky' => true,
'@Symfony' => true,
'declare_strict_types' => false,
'global_namespace_import' => false,
Expand Down
2 changes: 1 addition & 1 deletion src/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Command implements CommandInterface
public function __construct(
$name,
array $args = [],
HandlerStack $handlerStack = null
?HandlerStack $handlerStack = null
) {
$this->name = $name;
$this->data = $args;
Expand Down
6 changes: 3 additions & 3 deletions src/Exception/CommandException.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ public static function fromPrevious(CommandInterface $command, \Exception $prev)
public function __construct(
$message,
CommandInterface $command,
\Exception $previous = null,
RequestInterface $request = null,
ResponseInterface $response = null
?\Exception $previous = null,
?RequestInterface $request = null,
?ResponseInterface $response = null
) {
$this->command = $command;
$this->request = $request;
Expand Down
2 changes: 1 addition & 1 deletion src/ServiceClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function __construct(
HttpClient $httpClient,
callable $commandToRequestTransformer,
callable $responseToResultTransformer,
HandlerStack $commandHandlerStack = null
?HandlerStack $commandHandlerStack = null
) {
$this->httpClient = $httpClient;
$this->commandToRequestTransformer = $commandToRequestTransformer;
Expand Down
2 changes: 1 addition & 1 deletion vendor-bin/php-cs-fixer/composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"require": {
"php": "^7.4 || ^8.0",
"friendsofphp/php-cs-fixer": "3.40.2"
"friendsofphp/php-cs-fixer": "3.52.1"
},
"config": {
"preferred-install": "dist"
Expand Down

0 comments on commit 53e5973

Please sign in to comment.