mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-13 04:04:12 +02:00
[ticket/14895] Fix issues in CLI classes
PHPBB3-14895
This commit is contained in:
@@ -31,21 +31,21 @@ class migrate extends \phpbb\console\command\db\migration_command
|
||||
/** @var \phpbb\language\language */
|
||||
protected $language;
|
||||
|
||||
function __construct(\phpbb\user $user, \phpbb\language\language $language, \phpbb\db\migrator $migrator, \phpbb\extension\manager $extension_manager, \phpbb\config\config $config, \phpbb\cache\service $cache, \phpbb\log\log $log, \phpbb\filesystem\filesystem_interface $filesystem, $phpbb_root_path)
|
||||
public function __construct(\phpbb\user $user, \phpbb\language\language $language, \phpbb\db\migrator $migrator, \phpbb\extension\manager $extension_manager, \phpbb\config\config $config, \phpbb\cache\service $cache, \phpbb\log\log $log, \phpbb\filesystem\filesystem_interface $filesystem, $phpbb_root_path)
|
||||
{
|
||||
$this->language = $language;
|
||||
$this->log = $log;
|
||||
$this->filesystem = $filesystem;
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
parent::__construct($user, $migrator, $extension_manager, $config, $cache);
|
||||
$this->user->add_lang(array('common', 'install', 'migrator'));
|
||||
$this->language->add_lang(array('common', 'install', 'migrator'));
|
||||
}
|
||||
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('db:migrate')
|
||||
->setDescription($this->user->lang('CLI_DESCRIPTION_DB_MIGRATE'))
|
||||
->setDescription($this->language->lang('CLI_DESCRIPTION_DB_MIGRATE'))
|
||||
;
|
||||
}
|
||||
|
||||
|
@@ -26,7 +26,7 @@ abstract class migration_command extends \phpbb\console\command\command
|
||||
/** @var \phpbb\cache\service */
|
||||
protected $cache;
|
||||
|
||||
function __construct(\phpbb\user $user, \phpbb\db\migrator $migrator, \phpbb\extension\manager $extension_manager, \phpbb\config\config $config, \phpbb\cache\service $cache)
|
||||
public function __construct(\phpbb\user $user, \phpbb\db\migrator $migrator, \phpbb\extension\manager $extension_manager, \phpbb\config\config $config, \phpbb\cache\service $cache)
|
||||
{
|
||||
$this->migrator = $migrator;
|
||||
$this->extension_manager = $extension_manager;
|
||||
|
@@ -18,35 +18,17 @@ use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Style\SymfonyStyle;
|
||||
|
||||
class revert extends \phpbb\console\command\db\migration_command
|
||||
class revert extends \phpbb\console\command\db\migrate
|
||||
{
|
||||
/** @var string phpBB root path */
|
||||
protected $phpbb_root_path;
|
||||
|
||||
/** @var \phpbb\filesystem\filesystem_interface */
|
||||
protected $filesystem;
|
||||
|
||||
/** @var \phpbb\language\language */
|
||||
protected $language;
|
||||
|
||||
function __construct(\phpbb\user $user, \phpbb\language\language $language, \phpbb\db\migrator $migrator, \phpbb\extension\manager $extension_manager, \phpbb\config\config $config, \phpbb\cache\service $cache, \phpbb\filesystem\filesystem_interface $filesystem, $phpbb_root_path)
|
||||
{
|
||||
$this->filesystem = $filesystem;
|
||||
$this->language = $language;
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
parent::__construct($user, $migrator, $extension_manager, $config, $cache);
|
||||
$this->user->add_lang(array('common', 'migrator'));
|
||||
}
|
||||
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('db:revert')
|
||||
->setDescription($this->user->lang('CLI_DESCRIPTION_DB_REVERT'))
|
||||
->setDescription($this->language->lang('CLI_DESCRIPTION_DB_REVERT'))
|
||||
->addArgument(
|
||||
'name',
|
||||
InputArgument::REQUIRED,
|
||||
$this->user->lang('CLI_MIGRATION_NAME')
|
||||
$this->language->lang('CLI_MIGRATION_NAME')
|
||||
)
|
||||
;
|
||||
}
|
||||
|
Reference in New Issue
Block a user