From ac087c0289d1764743c457ebf5fc72e2584615b5 Mon Sep 17 00:00:00 2001 From: bert-w Date: Wed, 19 Oct 2022 19:50:15 +0200 Subject: [PATCH 1/2] Update Application.php --- src/Illuminate/Console/Application.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Illuminate/Console/Application.php b/src/Illuminate/Console/Application.php index 78a8c0468d74..5e2457997358 100755 --- a/src/Illuminate/Console/Application.php +++ b/src/Illuminate/Console/Application.php @@ -13,6 +13,7 @@ use Symfony\Component\Console\Application as SymfonyApplication; use Symfony\Component\Console\Command\Command as SymfonyCommand; use Symfony\Component\Console\Exception\CommandNotFoundException; +use Symfony\Component\Console\Exception\ExceptionInterface; use Symfony\Component\Console\Input\ArgvInput; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Input\InputDefinition; @@ -93,6 +94,13 @@ public function run(InputInterface $input = null, OutputInterface $output = null $input = $input ?: new ArgvInput ); + try { + // Use command's input definition to properly parse the arguments. + $input->bind($this->find($commandName)->getDefinition()); + } catch (ExceptionInterface) { + // Ignore invalid options/arguments for now. + } + $this->events->dispatch( new CommandStarting( $commandName, $input, $output = $output ?: new BufferedConsoleOutput From 070b6eb0845e270aa2bbefad2b782f5396c12f42 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Wed, 2 Nov 2022 15:30:14 -0500 Subject: [PATCH 2/2] Update Application.php --- src/Illuminate/Console/Application.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Illuminate/Console/Application.php b/src/Illuminate/Console/Application.php index 5e2457997358..826d06826855 100755 --- a/src/Illuminate/Console/Application.php +++ b/src/Illuminate/Console/Application.php @@ -95,10 +95,9 @@ public function run(InputInterface $input = null, OutputInterface $output = null ); try { - // Use command's input definition to properly parse the arguments. $input->bind($this->find($commandName)->getDefinition()); } catch (ExceptionInterface) { - // Ignore invalid options/arguments for now. + // ... } $this->events->dispatch(