From a8b878349a06638d33004086ce9e0c673e3f2a59 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Tue, 27 Dec 2022 14:29:13 +0100 Subject: [PATCH] [ticket/16955] Remove shell option as this has been removed in Symfony 3.0 PHPBB3-16955 --- phpBB/phpbb/console/application.php | 59 ----------------------------- 1 file changed, 59 deletions(-) diff --git a/phpBB/phpbb/console/application.php b/phpBB/phpbb/console/application.php index 830ed1b2c1..6726904e8f 100644 --- a/phpBB/phpbb/console/application.php +++ b/phpBB/phpbb/console/application.php @@ -21,11 +21,6 @@ use Symfony\Component\Console\Output\OutputInterface; class application extends \Symfony\Component\Console\Application { - /** - * @var bool Indicates whether or not we are in a shell - */ - protected $in_shell = false; - /** * @var \phpbb\config\config Config object */ @@ -62,41 +57,6 @@ class application extends \Symfony\Component\Console\Application return $input_definition; } - /** - * Gets the help message. - * - * It's a hack of the default help message to display the --shell - * option only for the application and not for all the commands. - * - * @return string A help message. - */ - public function getHelp() - { - // If we are already in a shell - // we do not want to have the --shell option available - if ($this->in_shell) - { - return parent::getHelp(); - } - - try - { - $definition = $this->getDefinition(); - $definition->addOption(new InputOption( - '--shell', - '-s', - InputOption::VALUE_NONE, - $this->language->lang('CLI_DESCRIPTION_OPTION_SHELL') - )); - } - catch (\LogicException $e) - { - // Do nothing - } - - return parent::getHelp(); - } - /** * Register a set of commands from the container * @@ -118,25 +78,6 @@ class application extends \Symfony\Component\Console\Application } } - /** - * {@inheritdoc} - */ - public function doRun(InputInterface $input, OutputInterface $output) - { - // Run a shell if the --shell (or -s) option is set and if no command name is specified - // Also, we do not want to have the --shell option available if we are already in a shell - if (!$this->in_shell && $this->getCommandName($input) === null && $input->hasParameterOption(array('--shell', '-s'))) - { - $shell = new Shell($this); - $this->in_shell = true; - $shell->run(); - - return 0; - } - - return parent::doRun($input, $output); - } - /** * Register global options *