kernel); $application->setAutoExit(false); $input = new ArrayInput( array_merge( ['command' => $message->getCommandName()], $message->getFormattedOptions(), $message->getArguments() ) ); $output = new BufferedOutput(); if ($application->run($input, $output) > 0) { $this->logger->error($output->fetch()); return; } echo $output->fetch(); } }