From ea24de8de3e4f451aa4394f0f46d6955ccb671c2 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Wed, 2 Jan 2013 04:04:01 +0100 Subject: [ticket/11306] Introduce phpbb_create_default_container Extracts default container construction to factory function, removing boilerplate duplication for container construction. PHPBB3-11306 --- phpBB/common.php | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'phpBB/common.php') diff --git a/phpBB/common.php b/phpBB/common.php index 3e0b8e324b..2ed55dfa95 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -87,18 +87,7 @@ $phpbb_class_loader_ext = new phpbb_class_loader('phpbb_ext_', "{$phpbb_root_pat $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(), - new phpbb_di_pass_kernel_pass(), - ), - $phpbb_root_path, - $phpEx -); +$phpbb_container = phpbb_create_default_container($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')); -- cgit v1.2.1