From b5aef65a52b206d1cff5509fbc882d5781aa8232 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Wed, 16 Jul 2025 13:57:41 +0800 Subject: [PATCH] Fix Symfony deprecation warning when `addCommand()` exists without `add()` method Signed-off-by: Mior Muhammad Zaki --- src/Illuminate/Console/Application.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Illuminate/Console/Application.php b/src/Illuminate/Console/Application.php index 3db2e9bb3bfe..8e04558342ba 100755 --- a/src/Illuminate/Console/Application.php +++ b/src/Illuminate/Console/Application.php @@ -205,6 +205,18 @@ public function output() : ''; } + /** + * Add a command to the console. + * + * @param \Symfony\Component\Console\Command\Command $command + * @param \Symfony\Component\Console\Command\Command|callable $command + * @return \Symfony\Component\Console\Command\Command|null + */ + public function add(SymfonyCommand $command): ?SymfonyCommand + { + return $this->addCommand($command); + } + /** * Add a command to the console. *