From 7025123fb5e910dbb5b290fde7dc6393138e4126 Mon Sep 17 00:00:00 2001 From: Andy Postnikov Date: Tue, 23 Jul 2024 18:41:39 +0300 Subject: [PATCH] PHP 8.4 compatibility: implicitly nullable parameter declarations deprecated (#311) 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)) {