diff options
author | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-05-01 14:09:08 -0500 |
---|---|---|
committer | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-05-01 14:09:08 -0500 |
commit | 60e32728393d4258f92f7893f8275889278a995f (patch) | |
tree | b6c3094d0af17db29c30511d90428224ddfde6c5 | |
parent | 7ed21cc6f2b7eee305d0c7c00821ef1ce680b77e (diff) | |
download | forums-60e32728393d4258f92f7893f8275889278a995f.tar forums-60e32728393d4258f92f7893f8275889278a995f.tar.gz forums-60e32728393d4258f92f7893f8275889278a995f.tar.bz2 forums-60e32728393d4258f92f7893f8275889278a995f.tar.xz forums-60e32728393d4258f92f7893f8275889278a995f.zip |
[ticket/11415] Remove migrator dependency from extension manager
PHPBB3-11415
-rw-r--r-- | phpBB/config/services.yml | 1 | ||||
-rw-r--r-- | phpBB/includes/extension/manager.php | 5 | ||||
-rw-r--r-- | tests/dbal/migrator_test.php | 6 | ||||
-rw-r--r-- | tests/extension/manager_test.php | 6 | ||||
-rw-r--r-- | tests/extension/metadata_manager_test.php | 5 | ||||
-rw-r--r-- | tests/test_framework/phpbb_functional_test_case.php | 5 |
6 files changed, 18 insertions, 10 deletions
diff --git a/phpBB/config/services.yml b/phpBB/config/services.yml index 7923c94a3f..306dc2dc77 100644 --- a/phpBB/config/services.yml +++ b/phpBB/config/services.yml @@ -130,7 +130,6 @@ services: - @service_container - @dbal.conn - @config - - @migrator - @filesystem - %tables.ext% - %core.root_path% diff --git a/phpBB/includes/extension/manager.php b/phpBB/includes/extension/manager.php index 8b8a69f14c..b42043748f 100644 --- a/phpBB/includes/extension/manager.php +++ b/phpBB/includes/extension/manager.php @@ -29,7 +29,6 @@ class phpbb_extension_manager protected $db; protected $config; - protected $migrator; protected $cache; protected $php_ext; protected $extensions; @@ -43,7 +42,6 @@ class phpbb_extension_manager * @param ContainerInterface $container A container * @param phpbb_db_driver $db A database connection * @param phpbb_config $config phpbb_config - * @param phpbb_db_migrator $migrator * @param phpbb_filesystem $filesystem * @param string $extension_table The name of the table holding extensions * @param string $phpbb_root_path Path to the phpbb includes directory. @@ -51,13 +49,12 @@ class phpbb_extension_manager * @param phpbb_cache_driver_interface $cache A cache instance or null * @param string $cache_name The name of the cache variable, defaults to _ext */ - public function __construct(ContainerInterface $container, phpbb_db_driver $db, phpbb_config $config, phpbb_db_migrator $migrator, phpbb_filesystem $filesystem, $extension_table, $phpbb_root_path, $php_ext = 'php', phpbb_cache_driver_interface $cache = null, $cache_name = '_ext') + public function __construct(ContainerInterface $container, phpbb_db_driver $db, phpbb_config $config, phpbb_filesystem $filesystem, $extension_table, $phpbb_root_path, $php_ext = 'php', phpbb_cache_driver_interface $cache = null, $cache_name = '_ext') { $this->container = $container; $this->phpbb_root_path = $phpbb_root_path; $this->db = $db; $this->config = $config; - $this->migrator = $migrator; $this->cache = $cache; $this->filesystem = $filesystem; $this->php_ext = $php_ext; diff --git a/tests/dbal/migrator_test.php b/tests/dbal/migrator_test.php index 6390d6a715..5fc05f2119 100644 --- a/tests/dbal/migrator_test.php +++ b/tests/dbal/migrator_test.php @@ -55,8 +55,12 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case 'phpbb_', $tools ); + + $container = new phpbb_mock_container_builder(); + $container->set('migrator', $migrator); + $this->extension_manager = new phpbb_extension_manager( - new phpbb_mock_container_builder(), + $container, $this->db, $this->config, $this->migrator, diff --git a/tests/extension/manager_test.php b/tests/extension/manager_test.php index 106f078691..43b7410654 100644 --- a/tests/extension/manager_test.php +++ b/tests/extension/manager_test.php @@ -107,11 +107,13 @@ class phpbb_extension_manager_test extends phpbb_database_test_case $table_prefix, array() ); + $container = new phpbb_mock_container_builder(); + $container->set('migrator', $migrator); + return new phpbb_extension_manager( - new phpbb_mock_container_builder(), + $container, $db, $config, - $migrator, new phpbb_filesystem(), 'phpbb_ext', dirname(__FILE__) . '/', diff --git a/tests/extension/metadata_manager_test.php b/tests/extension/metadata_manager_test.php index 05d1cbccc3..92a0ff126c 100644 --- a/tests/extension/metadata_manager_test.php +++ b/tests/extension/metadata_manager_test.php @@ -59,8 +59,11 @@ class metadata_manager_test extends phpbb_database_test_case $this->table_prefix, array() ); + $container = new phpbb_mock_container_builder(); + $container->set('migrator', $migrator); + $this->extension_manager = new phpbb_extension_manager( - new phpbb_mock_container_builder(), + $container, $this->db, $this->config, $this->migrator, diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php index 5534de89c9..a11c0f72ca 100644 --- a/tests/test_framework/phpbb_functional_test_case.php +++ b/tests/test_framework/phpbb_functional_test_case.php @@ -148,8 +148,11 @@ class phpbb_functional_test_case extends phpbb_test_case self::$config['table_prefix'], array() ); + $container = new phpbb_mock_container_builder(); + $container->set('migrator', $migrator); + $extension_manager = new phpbb_extension_manager( - new phpbb_mock_container_builder(), + $container, $db, $config, $migrator, |