1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-21 00:02:18 +02:00

[ticket/12963] Revert back to "migrations" folder name for extensions

The issues that can be created with the name change are just too much

PHPBB3-12963
This commit is contained in:
Joas Schilling 2014-09-18 10:42:21 +02:00
parent 53e028ff14
commit c220fa89a1
4 changed files with 1 additions and 35 deletions

View File

@ -181,17 +181,9 @@ $phpbb_extension_manager = $phpbb_container->get('ext.manager');
$migrations = $phpbb_extension_manager
->get_finder()
->core_path('phpbb/db/migration/data/')
->extension_directory('/migration')
->get_classes();
// @deprecated 3.1.0-RC4 (To be removed: 3.2.0)
$migrations_deprecated = $phpbb_extension_manager
->get_finder()
->extension_directory('/migrations')
->get_classes();
$migrations = array_merge($migrations, $migrations_deprecated);
$migrator->set_migrations($migrations);
// What is a safe limit of execution time? Half the max execution time should be safe.

View File

@ -117,17 +117,9 @@ 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 3.1.0-RC4 (To be removed: 3.2.0)
$migrations_deprecated = $this->extension_manager
->get_finder()
->extension_directory('/migrations')
->get_classes();
$migrations = array_merge($migrations, $migrations_deprecated);
$this->migrator->set_migrations($migrations);
}

View File

@ -132,20 +132,11 @@ class base implements \phpbb\extension\extension_interface
// Only have the finder search in this extension path directory
$migrations = $this->extension_finder
->extension_directory('/migration')
->extension_directory('/migrations')
->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;
}
}

View File

@ -71,19 +71,10 @@ abstract class phpbb_database_test_case extends PHPUnit_Extensions_Database_Test
$finder = new \phpbb\finder(new \phpbb\filesystem(), $phpbb_root_path, null, $phpEx);
$classes = $finder->core_path('phpbb/')
->core_directory('db/migration/data/')
->set_extensions($setup_extensions)
->extension_directory('/migration')
->get_classes();
// @deprecated 3.1.0-RC4 (To be removed: 3.2.0)
$finder = new \phpbb\finder(new \phpbb\filesystem(), $phpbb_root_path, null, $phpEx);
$classes_deprecated = $finder
->set_extensions($setup_extensions)
->extension_directory('/migrations')
->get_classes();
$classes = array_merge($classes, $classes_deprecated);
$db = new \phpbb\db\driver\sqlite();
$schema_generator = new \phpbb\db\migration\schema_generator($classes, new \phpbb\config\config(array()), $db, new \phpbb\db\tools($db, true), $phpbb_root_path, $phpEx, $table_prefix);
$schema_data = $schema_generator->get_schema();