aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db/migration.php
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2013-01-08 22:07:26 -0600
committerNathan Guse <nathaniel.guse@gmail.com>2013-01-09 16:44:05 -0600
commit6c44dadecbf50d6550f98dd1e1694519f39be680 (patch)
treed23243249bdea3eea2097136c2c79e471c3bd1e4 /phpBB/includes/db/migration.php
parent41de95bc11c0b64eafa294f03432f619d3d712d5 (diff)
downloadforums-6c44dadecbf50d6550f98dd1e1694519f39be680.tar
forums-6c44dadecbf50d6550f98dd1e1694519f39be680.tar.gz
forums-6c44dadecbf50d6550f98dd1e1694519f39be680.tar.bz2
forums-6c44dadecbf50d6550f98dd1e1694519f39be680.tar.xz
forums-6c44dadecbf50d6550f98dd1e1694519f39be680.zip
[feature/migrations] Move migrator to service container
Version numbers 3.1 updates Restore database_update.php file to what it was in develop Get first forum to place global announcements in PHPBB3-9737
Diffstat (limited to 'phpBB/includes/db/migration.php')
-rw-r--r--phpBB/includes/db/migration.php20
1 files changed, 9 insertions, 11 deletions
diff --git a/phpBB/includes/db/migration.php b/phpBB/includes/db/migration.php
index 4e83d2570c..1acef2d429 100644
--- a/phpBB/includes/db/migration.php
+++ b/phpBB/includes/db/migration.php
@@ -26,6 +26,7 @@ if (!defined('IN_PHPBB'))
*/
class phpbb_db_migration
{
+ protected $config;
protected $db;
protected $db_tools;
protected $table_prefix;
@@ -38,20 +39,17 @@ class phpbb_db_migration
/**
* Migration constructor
*
- * @param dbal $db Connected database abstraction instance
- * @param phpbb_db_tools $db_tools Instance of db schema manipulation tools
- * @param string $table_prefix The prefix for all table names
- * @param string $phpbb_root_path
- * @param string $php_ext
+ * @param \Symfony\Component\DependencyInjection\ContainerInterface $container Container supplying dependencies
*/
- public function phpbb_db_migration($db, $db_tools, $table_prefix, $phpbb_root_path, $php_ext)
+ public function phpbb_db_migration(\Symfony\Component\DependencyInjection\ContainerInterface $container)
{
- $this->db = $db;
- $this->db_tools = $db_tools;
- $this->table_prefix = $table_prefix;
+ $this->config = $this->container->get('config');
+ $this->db = $this->container->get('dbal.conn');
+ $this->db_tools = $this->container->get('dbal.tools');
+ $this->table_prefix = $this->container->getParameters('core.table_prefix');
- $this->phpbb_root_path = $phpbb_root_path;
- $this->php_ext = $php_ext;
+ $this->phpbb_root_path = $this->container->getParameters('core.root_path');
+ $this->php_ext = $this->container->getParameters('core.php_ext');
$this->errors = array();
}