mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-08 01:36:57 +02:00
[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
This commit is contained in:
@@ -210,7 +210,13 @@ if (!$db_tools->sql_table_exists($table_prefix . 'migrations'))
|
||||
}
|
||||
|
||||
$migrator = $phpbb_container->get('migrator');
|
||||
$migrator->load_migrations($phpbb_root_path . 'includes/db/migration/data/');
|
||||
$extension_manager = $phpbb_container->get('ext.manager');
|
||||
$finder = $extension_manager->get_finder();
|
||||
|
||||
$migrations = $finder
|
||||
->core_path('includes/db/migration/data/')
|
||||
->get_classes();
|
||||
$migrator->set_migrations($migrations);
|
||||
|
||||
// What is a safe limit of execution time? Half the max execution time should be safe.
|
||||
$safe_time_limit = (ini_get('max_execution_time') / 2);
|
||||
|
Reference in New Issue
Block a user