mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-14 20:54:13 +02:00
[ticket/14039] Revamp updater
PHPBB3-14039
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
namespace phpbb\console\command\db;
|
||||
|
||||
use phpbb\db\output_handler\log_wrapper_migrator_output_handler;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
@@ -26,8 +27,12 @@ class migrate extends \phpbb\console\command\db\migration_command
|
||||
/** @var \phpbb\filesystem\filesystem_interface */
|
||||
protected $filesystem;
|
||||
|
||||
function __construct(\phpbb\user $user, \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)
|
||||
/** @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)
|
||||
{
|
||||
$this->language = $language;
|
||||
$this->log = $log;
|
||||
$this->filesystem = $filesystem;
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
@@ -45,7 +50,7 @@ class migrate extends \phpbb\console\command\db\migration_command
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$this->migrator->set_output_handler(new \phpbb\db\log_wrapper_migrator_output_handler($this->user, new console_migrator_output_handler($this->user, $output), $this->phpbb_root_path . 'store/migrations_' . time() . '.log', $this->filesystem));
|
||||
$this->migrator->set_output_handler(new log_wrapper_migrator_output_handler($this->language, new console_migrator_output_handler($this->user, $output), $this->phpbb_root_path . 'store/migrations_' . time() . '.log', $this->filesystem));
|
||||
|
||||
$this->migrator->create_migrations_table();
|
||||
|
||||
|
Reference in New Issue
Block a user