From e4f782819968ec44f1dd207dc9de7ec703826d29 Mon Sep 17 00:00:00 2001 From: Nathaniel Guse <nathaniel.guse@gmail.com> Date: Sun, 3 Mar 2013 19:54:22 -0600 Subject: [ticket/11386] Send list of migrations instead of using load_migrations Remove dependency of extension manager for migrator. Keeping load_migrations function for others to use if they desire but requiring the finder be sent to it in order to use it. PHPBB3-11386 --- phpBB/install/install_install.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'phpBB/install/install_install.php') diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index f0280acc40..4cc154509c 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -114,7 +114,7 @@ class install_install extends module $this->add_bots($mode, $sub); $this->email_admin($mode, $sub); $this->disable_avatars_if_unwritable(); - $this->populate_migrations($phpbb_container->get('migrator'), $phpbb_root_path); + $this->populate_migrations($phpbb_container->get('ext.manager'), $phpbb_container->get('migrator')); // Remove the lock file @unlink($phpbb_root_path . 'cache/install_lock'); @@ -1888,12 +1888,17 @@ class install_install extends module * "installs" means it adds all migrations to the migrations table, but does not * perform any of the actions in the migrations. * + * @param phpbb_extension_manager $extension_manager * @param phpbb_db_migrator $migrator - * @param string $phpbb_root_path */ - function populate_migrations($migrator, $phpbb_root_path) + function populate_migrations($extension_manager, $migrator) { - $migrator->populate_migrations_from_directory($phpbb_root_path . 'includes/db/migration/data/'); + $finder = $extension_manager->get_finder(); + + $migrations = $finder + ->core_path('includes/db/migration/data/') + ->get_classes(); + $migrator->populate_migrations($migrations); } /** -- cgit v1.2.1