1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-05 07:07:51 +02:00

[ticket/11415] Remove migrator dependency from extension manager

PHPBB3-11415
This commit is contained in:
Nathaniel Guse 2013-05-01 14:09:08 -05:00
parent 7ed21cc6f2
commit 60e3272839
6 changed files with 18 additions and 10 deletions

View File

@ -130,7 +130,6 @@ services:
- @service_container
- @dbal.conn
- @config
- @migrator
- @filesystem
- %tables.ext%
- %core.root_path%

View File

@ -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;

View File

@ -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,

View File

@ -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__) . '/',

View File

@ -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,

View File

@ -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,