diff --git a/src/Console/Application.php b/src/Console/Application.php index 342ab38d..e4cc2cba 100644 --- a/src/Console/Application.php +++ b/src/Console/Application.php @@ -2,12 +2,10 @@ namespace Castor\Console; -use Castor\Console\Command\ComposerCommand; use Castor\Container; use Castor\Kernel; use Symfony\Component\Console\Application as SymfonyApplication; use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Exception\CommandNotFoundException; use Symfony\Component\Console\Input\InputDefinition; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; @@ -45,9 +43,7 @@ public function doRun(InputInterface $input, OutputInterface $output): int // @phpstan-ignore-next-line Container::set($this->containerBuilder->get(Container::class)); - if ($this->shouldBootKernel($input)) { - $this->kernel->boot($input, $output); - } + $this->kernel->boot($input, $output); return parent::doRun($input, $output); } @@ -89,26 +85,6 @@ protected function getDefaultInputDefinition(): InputDefinition return $definition; } - private function shouldBootKernel(InputInterface $input): bool - { - $name = $input->getFirstArgument(); - if (!$name) { - return true; - } - - try { - $command = $this->find($name); - } catch (CommandNotFoundException) { - return true; - } - - if ($command instanceof ComposerCommand) { - return false; - } - - return true; - } - private function getLogo(): string { if (!($_SERVER['CASTOR_TEST'] ?? false)) {