mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[feature/migrations] Inject migrator rather than the container.
Some docblocks PHBB3-9737
This commit is contained in:
parent
a665ad5c2e
commit
7a8ae49300
1 changed files with 12 additions and 3 deletions
|
@ -114,7 +114,7 @@ class install_install extends module
|
||||||
$this->add_bots($mode, $sub);
|
$this->add_bots($mode, $sub);
|
||||||
$this->email_admin($mode, $sub);
|
$this->email_admin($mode, $sub);
|
||||||
$this->disable_avatars_if_unwritable();
|
$this->disable_avatars_if_unwritable();
|
||||||
$this->populate_migrations($phpbb_container, $phpbb_root_path);
|
$this->populate_migrations($phpbb_container->get('migrator'), $phpbb_root_path);
|
||||||
|
|
||||||
// Remove the lock file
|
// Remove the lock file
|
||||||
@unlink($phpbb_root_path . 'cache/install_lock');
|
@unlink($phpbb_root_path . 'cache/install_lock');
|
||||||
|
@ -1881,9 +1881,18 @@ class install_install extends module
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function populate_migrations($container, $phpbb_root_path)
|
/**
|
||||||
|
* Populate migrations for the installation
|
||||||
|
*
|
||||||
|
* This "installs" all migrations from (root path)/includes/db/migrations/data.
|
||||||
|
* "installs" means it adds all migrations to the migrations table, but does not
|
||||||
|
* perform any of the actions in the migrations.
|
||||||
|
*
|
||||||
|
* @param phpbb_db_migrator $migrator
|
||||||
|
* @param string $phpbb_root_path
|
||||||
|
*/
|
||||||
|
function populate_migrations($migrator, $phpbb_root_path)
|
||||||
{
|
{
|
||||||
$migrator = $container->get('migrator');
|
|
||||||
$migrator->populate_migrations_from_directory($phpbb_root_path . 'includes/db/migration/data/');
|
$migrator->populate_migrations_from_directory($phpbb_root_path . 'includes/db/migration/data/');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue