aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/install/database_update.php6
-rw-r--r--phpBB/phpbb/console/command/db/migrate.php9
-rw-r--r--phpBB/phpbb/extension/base.php12
3 files changed, 23 insertions, 4 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 7299c0aa2a..f0091ac995 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -177,11 +177,11 @@ $migrator = $phpbb_container->get('migrator');
$migrator->create_migrations_table();
$phpbb_extension_manager = $phpbb_container->get('ext.manager');
-$finder = $phpbb_extension_manager->get_finder();
-$migrations = $finder
+$migrations = $phpbb_extension_manager
+ ->get_finder()
->core_path('phpbb/db/migration/data/')
- ->extension_directory('/migrations')
+ ->extension_directory('/migration')
->get_classes();
// @deprecated to be removed in 3.2 final
diff --git a/phpBB/phpbb/console/command/db/migrate.php b/phpBB/phpbb/console/command/db/migrate.php
index c3caae5f70..a25886fb82 100644
--- a/phpBB/phpbb/console/command/db/migrate.php
+++ b/phpBB/phpbb/console/command/db/migrate.php
@@ -117,8 +117,17 @@ class migrate extends \phpbb\console\command\command
$migrations = $this->extension_manager
->get_finder()
->core_path('phpbb/db/migration/data/')
+ ->extension_directory('/migration')
+ ->get_classes();
+
+ // @deprecated to be removed in 3.2 final
+ $migrations_deprecated = $this->extension_manager
+ ->get_finder()
->extension_directory('/migrations')
->get_classes();
+
+ $migrations = array_merge($migrations, $migrations_deprecated);
+
$this->migrator->set_migrations($migrations);
}
diff --git a/phpBB/phpbb/extension/base.php b/phpBB/phpbb/extension/base.php
index e0ccb4c65b..9cd37ec8b2 100644
--- a/phpBB/phpbb/extension/base.php
+++ b/phpBB/phpbb/extension/base.php
@@ -132,10 +132,20 @@ class base implements \phpbb\extension\extension_interface
// Only have the finder search in this extension path directory
$migrations = $this->extension_finder
- ->extension_directory('/migrations')
+ ->extension_directory('/migration')
->find_from_extension($this->extension_name, $this->extension_path);
+
$migrations = $this->extension_finder->get_classes_from_files($migrations);
+ // @deprecated to be removed in 3.2 final
+ $migrations_deprecated = $this->extension_finder
+ ->extension_directory('/migrations')
+ ->find_from_extension($this->extension_name, $this->extension_path);
+
+ $migrations_deprecated = $this->extension_finder->get_classes_from_files($migrations_deprecated);
+
+ $migrations = array_merge($migrations, $migrations_deprecated);
+
return $migrations;
}
}