mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/16649] Upgrade to Symfony 5
PHPBB3-16649
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
namespace phpbb\console\command\extension;
|
||||
|
||||
use Symfony\Component\Console\Command\Command as symfony_command;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
@@ -19,6 +20,9 @@ use Symfony\Component\Console\Style\SymfonyStyle;
|
||||
|
||||
class disable extends command
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
@@ -32,6 +36,16 @@ class disable extends command
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the command extension:disable.
|
||||
*
|
||||
* Disables the specified extension
|
||||
*
|
||||
* @param InputInterface $input An InputInterface instance
|
||||
* @param OutputInterface $output An OutputInterface instance
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$io = new SymfonyStyle($input, $output);
|
||||
@@ -50,14 +64,14 @@ class disable extends command
|
||||
if ($this->manager->is_enabled($name))
|
||||
{
|
||||
$io->error($this->user->lang('CLI_EXTENSION_DISABLE_FAILURE', $name));
|
||||
return 1;
|
||||
return symfony_command::FAILURE;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->log->add('admin', ANONYMOUS, '', 'LOG_EXT_DISABLE', time(), array($name));
|
||||
$this->check_apcu_cache($io);
|
||||
$io->success($this->user->lang('CLI_EXTENSION_DISABLE_SUCCESS', $name));
|
||||
return 0;
|
||||
return symfony_command::SUCCESS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user