diff options
Diffstat (limited to 'phpBB/phpbb/extension/base.php')
-rw-r--r-- | phpBB/phpbb/extension/base.php | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/phpBB/phpbb/extension/base.php b/phpBB/phpbb/extension/base.php index 288fb7d19c..b74026e6ab 100644 --- a/phpBB/phpbb/extension/base.php +++ b/phpBB/phpbb/extension/base.php @@ -35,6 +35,9 @@ class base implements \phpbb\extension\extension_interface /** @var string */ protected $extension_path; + /** @var string[] */ + private $migrations = false; + /** * Constructor * @@ -122,19 +125,27 @@ class base implements \phpbb\extension\extension_interface */ protected function get_migration_file_list() { - static $migrations = false; - - if ($migrations !== false) + if ($this->migrations !== false) { - return $migrations; + return $this->migrations; } // 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 3.1.0-RC4 (To be removed: 3.2.0) + $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; } } |