From bb85c2d6bca364aa7d8fb1a570deb8e0f4e912e1 Mon Sep 17 00:00:00 2001 From: Andy Postnikov Date: Tue, 23 Jul 2024 18:55:30 +0300 Subject: [PATCH] PHP 8.4 compatibility (#1165) ref https://github.com/drush-ops/drush/issues/6069 --- src/Collection/CompletionWrapper.php | 2 +- src/Common/IO.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Collection/CompletionWrapper.php b/src/Collection/CompletionWrapper.php index 89aa5bb2f..b4a9428e2 100644 --- a/src/Collection/CompletionWrapper.php +++ b/src/Collection/CompletionWrapper.php @@ -54,7 +54,7 @@ class CompletionWrapper extends BaseTask implements WrappedTaskInterface * @param \Robo\Contract\TaskInterface $task * @param \Robo\Contract\TaskInterface|null $rollbackTask */ - public function __construct(Collection $collection, TaskInterface $task, TaskInterface $rollbackTask = null) + public function __construct(Collection $collection, TaskInterface $task, ?TaskInterface $rollbackTask = null) { $this->collection = $collection; $this->task = ($task instanceof WrappedTaskInterface) ? $task->original() : $task; diff --git a/src/Common/IO.php b/src/Common/IO.php index a57def067..cd0ea7673 100644 --- a/src/Common/IO.php +++ b/src/Common/IO.php @@ -45,7 +45,7 @@ public function restore() } // This should typically only be called by State::restore() - public function restoreState(InputInterface $input = null, OutputInterface $output = null, SymfonyStyle $io = null) + public function restoreState(?InputInterface $input = null, ?OutputInterface $output = null, ?SymfonyStyle $io = null) { $this->setInput($input); $this->setOutput($output);