mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-05 15:16:16 +02:00
[ticket/11415] Remove migrator dependency from extension manager
PHPBB3-11415
This commit is contained in:
parent
7ed21cc6f2
commit
60e3272839
@ -130,7 +130,6 @@ services:
|
|||||||
- @service_container
|
- @service_container
|
||||||
- @dbal.conn
|
- @dbal.conn
|
||||||
- @config
|
- @config
|
||||||
- @migrator
|
|
||||||
- @filesystem
|
- @filesystem
|
||||||
- %tables.ext%
|
- %tables.ext%
|
||||||
- %core.root_path%
|
- %core.root_path%
|
||||||
|
@ -29,7 +29,6 @@ class phpbb_extension_manager
|
|||||||
|
|
||||||
protected $db;
|
protected $db;
|
||||||
protected $config;
|
protected $config;
|
||||||
protected $migrator;
|
|
||||||
protected $cache;
|
protected $cache;
|
||||||
protected $php_ext;
|
protected $php_ext;
|
||||||
protected $extensions;
|
protected $extensions;
|
||||||
@ -43,7 +42,6 @@ class phpbb_extension_manager
|
|||||||
* @param ContainerInterface $container A container
|
* @param ContainerInterface $container A container
|
||||||
* @param phpbb_db_driver $db A database connection
|
* @param phpbb_db_driver $db A database connection
|
||||||
* @param phpbb_config $config phpbb_config
|
* @param phpbb_config $config phpbb_config
|
||||||
* @param phpbb_db_migrator $migrator
|
|
||||||
* @param phpbb_filesystem $filesystem
|
* @param phpbb_filesystem $filesystem
|
||||||
* @param string $extension_table The name of the table holding extensions
|
* @param string $extension_table The name of the table holding extensions
|
||||||
* @param string $phpbb_root_path Path to the phpbb includes directory.
|
* @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 phpbb_cache_driver_interface $cache A cache instance or null
|
||||||
* @param string $cache_name The name of the cache variable, defaults to _ext
|
* @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->container = $container;
|
||||||
$this->phpbb_root_path = $phpbb_root_path;
|
$this->phpbb_root_path = $phpbb_root_path;
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
$this->migrator = $migrator;
|
|
||||||
$this->cache = $cache;
|
$this->cache = $cache;
|
||||||
$this->filesystem = $filesystem;
|
$this->filesystem = $filesystem;
|
||||||
$this->php_ext = $php_ext;
|
$this->php_ext = $php_ext;
|
||||||
|
@ -55,8 +55,12 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case
|
|||||||
'phpbb_',
|
'phpbb_',
|
||||||
$tools
|
$tools
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$container = new phpbb_mock_container_builder();
|
||||||
|
$container->set('migrator', $migrator);
|
||||||
|
|
||||||
$this->extension_manager = new phpbb_extension_manager(
|
$this->extension_manager = new phpbb_extension_manager(
|
||||||
new phpbb_mock_container_builder(),
|
$container,
|
||||||
$this->db,
|
$this->db,
|
||||||
$this->config,
|
$this->config,
|
||||||
$this->migrator,
|
$this->migrator,
|
||||||
|
@ -107,11 +107,13 @@ class phpbb_extension_manager_test extends phpbb_database_test_case
|
|||||||
$table_prefix,
|
$table_prefix,
|
||||||
array()
|
array()
|
||||||
);
|
);
|
||||||
|
$container = new phpbb_mock_container_builder();
|
||||||
|
$container->set('migrator', $migrator);
|
||||||
|
|
||||||
return new phpbb_extension_manager(
|
return new phpbb_extension_manager(
|
||||||
new phpbb_mock_container_builder(),
|
$container,
|
||||||
$db,
|
$db,
|
||||||
$config,
|
$config,
|
||||||
$migrator,
|
|
||||||
new phpbb_filesystem(),
|
new phpbb_filesystem(),
|
||||||
'phpbb_ext',
|
'phpbb_ext',
|
||||||
dirname(__FILE__) . '/',
|
dirname(__FILE__) . '/',
|
||||||
|
@ -59,8 +59,11 @@ class metadata_manager_test extends phpbb_database_test_case
|
|||||||
$this->table_prefix,
|
$this->table_prefix,
|
||||||
array()
|
array()
|
||||||
);
|
);
|
||||||
|
$container = new phpbb_mock_container_builder();
|
||||||
|
$container->set('migrator', $migrator);
|
||||||
|
|
||||||
$this->extension_manager = new phpbb_extension_manager(
|
$this->extension_manager = new phpbb_extension_manager(
|
||||||
new phpbb_mock_container_builder(),
|
$container,
|
||||||
$this->db,
|
$this->db,
|
||||||
$this->config,
|
$this->config,
|
||||||
$this->migrator,
|
$this->migrator,
|
||||||
|
@ -148,8 +148,11 @@ class phpbb_functional_test_case extends phpbb_test_case
|
|||||||
self::$config['table_prefix'],
|
self::$config['table_prefix'],
|
||||||
array()
|
array()
|
||||||
);
|
);
|
||||||
|
$container = new phpbb_mock_container_builder();
|
||||||
|
$container->set('migrator', $migrator);
|
||||||
|
|
||||||
$extension_manager = new phpbb_extension_manager(
|
$extension_manager = new phpbb_extension_manager(
|
||||||
new phpbb_mock_container_builder(),
|
$container,
|
||||||
$db,
|
$db,
|
||||||
$config,
|
$config,
|
||||||
$migrator,
|
$migrator,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user