diff --git a/phpBB/phpbb/db/migration/data/v400/rename_duplicated_index_names.php b/phpBB/phpbb/db/migration/data/v400/rename_duplicated_index_names.php index eb785878fb..b4c10271e6 100644 --- a/phpBB/phpbb/db/migration/data/v400/rename_duplicated_index_names.php +++ b/phpBB/phpbb/db/migration/data/v400/rename_duplicated_index_names.php @@ -13,10 +13,10 @@ namespace phpbb\db\migration\data\v400; -use phpbb\db\migration\container_aware_migration; +use phpbb\db\migration\migration; use phpbb\db\doctrine\table_helper; -class rename_duplicated_index_names extends container_aware_migration +class rename_duplicated_index_names extends migration { public static function depends_on() { @@ -90,8 +90,7 @@ class rename_duplicated_index_names extends container_aware_migration public function get_tables_index_names() { $table_keys = []; - $doctrine = $this->container->get('dbal.conn.doctrine'); - $schema_manager = $doctrine->createSchemaManager(); + $schema_manager = $this->db_doctrine->createSchemaManager(); $table_names = $schema_manager->listTableNames(); if (!empty($table_names)) diff --git a/phpBB/phpbb/db/migration/migration.php b/phpBB/phpbb/db/migration/migration.php index 6bfc395e4d..63290229f9 100644 --- a/phpBB/phpbb/db/migration/migration.php +++ b/phpBB/phpbb/db/migration/migration.php @@ -28,6 +28,9 @@ abstract class migration implements migration_interface /** @var \phpbb\db\driver\driver_interface */ protected $db; + /** @var \Doctrine\DBAL\Connection */ + protected $db_doctrine; + /** @var \phpbb\db\tools\tools_interface */ protected $db_tools; @@ -72,6 +75,9 @@ abstract class migration implements migration_interface $this->php_ext = $php_ext; $this->errors = array(); + + $phpbb_config_php_file = new \phpbb\config_php_file($phpbb_root_path, $php_ext); + $this->db_doctrine = \phpbb\db\doctrine\connection_factory::get_connection($phpbb_config_php_file); } /**