/**
  * {@inheritdoc}
  */
 public function run()
 {
     if (!$this->config->get('populate_migration_refresh_before', false)) {
         if ($this->config->get_time_remaining() < 1) {
             $this->config->set('populate_migration_refresh_before', true);
             throw new resource_limit_reached_exception();
         }
     }
     $finder = $this->extension_manager->get_finder();
     $migrations = $finder->core_path('phpbb/db/migration/data/')->get_classes();
     $this->migrator->populate_migrations($migrations);
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 public function run()
 {
     $finder = $this->extension_manager->get_finder();
     $migrations = $finder->core_path('phpbb/db/migration/data/')->get_classes();
     $this->migrator->populate_migrations($migrations);
 }
Example #3
0
 /**
  * Populate migrations for the installation
  *
  * This "installs" all migrations from (root path)/phpbb/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\extension\manager $extension_manager
  * @param \phpbb\db\migrator $migrator
  */
 function populate_migrations($extension_manager, $migrator)
 {
     $finder = $extension_manager->get_finder();
     $migrations = $finder->core_path('phpbb/db/migration/data/')->get_classes();
     $migrator->populate_migrations($migrations);
 }