aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/database_update.php
diff options
context:
space:
mode:
authorIgor Wiedler <igor@wiedler.ch>2012-11-12 10:46:21 +0100
committerIgor Wiedler <igor@wiedler.ch>2012-11-12 10:46:21 +0100
commitbf641a7f31f87eb7b88437214315872bff36ae84 (patch)
tree6e850dff6caf7e939ee614a1dbeb5ba4f1deb002 /phpBB/install/database_update.php
parent9bc9ac281af9f194d73160ae3545105f24db5395 (diff)
parent5a5e507a14084b08e41c4d2f86f2fb6700e68eb5 (diff)
downloadforums-bf641a7f31f87eb7b88437214315872bff36ae84.tar
forums-bf641a7f31f87eb7b88437214315872bff36ae84.tar.gz
forums-bf641a7f31f87eb7b88437214315872bff36ae84.tar.bz2
forums-bf641a7f31f87eb7b88437214315872bff36ae84.tar.xz
forums-bf641a7f31f87eb7b88437214315872bff36ae84.zip
Merge remote-tracking branch 'upstream/develop' into ticket/11015
* upstream/develop: (31 commits) [ticket/11194] Service tag data is stored in an array so access it correctly [ticket/11193] Instantiate a single collection_pass for all collections [ticket/11152] Basic tests for the container functions [ticket/11152] Compile the install container [ticket/11152] Throw error if services.yml is missing [ticket/11152] Remove old container processor calls [ticket/11152] Use realpath in container extensions consistently [ticket/11152] Rename collection to collection_pass [ticket/11152] Remove @api docblocks [ticket/11152] Create separate function for debug-dependent container [ticket/11152] Change phpbb_di_pass_cron to generic phpbb_di_pass_collection [ticket/11152] Convert cron_task_collection to generic di_service_collection [ticket/11152] Use relative root path in container, one dumped container per path [ticket/11152] Move container functions to a separate function file [feature/compiled-dic] Rename $phpEx to $php_ext in new code [feature/compiled-dic] Use an absolute path for core.root_path parameter [feature/compiled-dic] Update the composer.lock file [feature/compiled-dic] Purge cache to make ext services available right away [feature/compiled-dic] Fix root path when container is created after install [feature/compiled-dic] Remove old test ...
Diffstat (limited to 'phpBB/install/database_update.php')
-rw-r--r--phpBB/install/database_update.php34
1 files changed, 21 insertions, 13 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index eb464f6750..ded9ed00f9 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -77,6 +77,7 @@ if (!defined('PHPBB_INSTALLED') || empty($dbms) || empty($acm_type))
require($phpbb_root_path . 'includes/class_loader.' . $phpEx);
require($phpbb_root_path . 'includes/functions.' . $phpEx);
+require($phpbb_root_path . 'includes/functions_container.' . $phpEx);
phpbb_require_updated('includes/functions_content.' . $phpEx, true);
@@ -97,20 +98,27 @@ if (!defined('EXT_TABLE'))
define('EXT_TABLE', $table_prefix . 'ext');
}
-$phpbb_container = new ContainerBuilder();
-$loader = new YamlFileLoader($phpbb_container, new FileLocator(__DIR__.'/../config'));
-$loader->load('services.yml');
-
-// We must include the DI processor class files because the class loader
-// is not yet set up
-require($phpbb_root_path . 'includes/di/processor/interface.' . $phpEx);
-require($phpbb_root_path . 'includes/di/processor/config.' . $phpEx);
-$processor = new phpbb_di_processor_config($phpbb_root_path . 'config.' . $phpEx, $phpbb_root_path, $phpEx);
-$processor->process($phpbb_container);
-
// Setup class loader first
-$phpbb_class_loader = $phpbb_container->get('class_loader');
-$phpbb_class_loader_ext = $phpbb_container->get('class_loader.ext');
+$phpbb_class_loader = new phpbb_class_loader('phpbb_', "{$phpbb_root_path}includes/", ".$phpEx");
+$phpbb_class_loader->register();
+$phpbb_class_loader_ext = new phpbb_class_loader('phpbb_ext_', "{$phpbb_root_path}ext/", ".$phpEx");
+$phpbb_class_loader_ext->register();
+
+// Set up container
+$phpbb_container = phpbb_create_dumped_container_unless_debug(
+ array(
+ new phpbb_di_extension_config($phpbb_root_path . 'config.' . $phpEx),
+ new phpbb_di_extension_core($phpbb_root_path),
+ ),
+ array(
+ new phpbb_di_pass_collection_pass(),
+ ),
+ $phpbb_root_path,
+ $phpEx
+);
+
+$phpbb_class_loader->set_cache($phpbb_container->get('cache.driver'));
+$phpbb_class_loader_ext->set_cache($phpbb_container->get('cache.driver'));
// set up caching
$cache = $phpbb_container->get('cache');