/** * @param \Symfony\Component\Console\Input\InputInterface $input * @param \Symfony\Component\Console\Output\OutputInterface $output * @return int */ protected function execute(InputInterface $input, OutputInterface $output) { try { return $this->command->withIO($input, $output)->execute(); } catch (ConsoleException $e) { $output->writeln($e->getMessage()); return -1; } }
/** * {@inheritdoc} */ public function withIO(InputInterface $input, OutputInterface $output) { $this->io = new SymfonyStyle($input, $output); return parent::withIO($input, $output); }