From 8cf729e74487d18240dfae9d8bb5bea2586d0003 Mon Sep 17 00:00:00 2001 From: Andy Postnikov Date: Tue, 23 Jul 2024 02:16:47 +0200 Subject: [PATCH] PHP 8.4 compatibility: implicitly nullable parameter declarations deprecated Ref https://github.com/drush-ops/drush/issues/6069 --- src/State/StateHelper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/State/StateHelper.php b/src/State/StateHelper.php index 8d68136..44d5600 100644 --- a/src/State/StateHelper.php +++ b/src/State/StateHelper.php @@ -17,7 +17,7 @@ class StateHelper * @param OutputInterface $output * @return State */ - public static function injectIntoCallbackObject($callback, InputInterface $input, OutputInterface $output = null) + public static function injectIntoCallbackObject($callback, InputInterface $input, ?OutputInterface $output = null) { return static::inject(static::recoverCallbackObject($callback), $input, $output); } @@ -29,7 +29,7 @@ public static function injectIntoCallbackObject($callback, InputInterface $input * @param OutputInterface $output * @return State */ - public static function inject($target, InputInterface $input, OutputInterface $output = null) + public static function inject($target, InputInterface $input, ?OutputInterface $output = null) { // Do not allow injection unless the target can save its state if (!$target || !($target instanceof SavableState)) {