phpbb_include_updated('includes/utf/utf_normalizer.' . $phpEx); phpbb_include_updated('includes/utf/utf_tools.' . $phpEx); phpbb_require_updated('includes/functions_install.' . $phpEx); // Setup class loader first $phpbb_class_loader_new = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}install/update/new/phpbb/", $phpEx); $phpbb_class_loader_new->register(); $phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx); $phpbb_class_loader->register(); $phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx); $phpbb_class_loader_ext->register(); // Set up container $phpbb_config_php_file = new \phpbb\config_php_file($phpbb_root_path, $phpEx); $phpbb_container_builder = new \phpbb\di\container_builder($phpbb_config_php_file, $phpbb_root_path, $phpEx); $phpbb_container_builder->set_use_extensions(false); $phpbb_container_builder->set_dump_container(false); $phpbb_container_builder->set_use_custom_pass(false); $phpbb_container_builder->set_inject_config(false); $phpbb_container_builder->set_compile_container(false); $other_config_path = $phpbb_root_path . 'install/update/new/config/'; $config_path = file_exists($other_config_path . 'services.yml') ? $other_config_path : $phpbb_root_path . 'config/'; $phpbb_container_builder->set_config_path($config_path); $phpbb_container_builder->set_custom_parameters(array('core.root_path' => $phpbb_root_path, 'core.adm_relative_path' => $phpbb_adm_relative_path, 'core.php_ext' => $phpEx, 'core.table_prefix' => '', 'cache.driver.class' => 'phpbb\\cache\\driver\\file')); $phpbb_container = $phpbb_container_builder->get_container(); $phpbb_container->register('dbal.conn.driver')->setSynthetic(true); $phpbb_container->compile(); $phpbb_class_loader->set_cache($phpbb_container->get('cache.driver')); $phpbb_class_loader_ext->set_cache($phpbb_container->get('cache.driver')); $phpbb_dispatcher = $phpbb_container->get('dispatcher'); $request = $phpbb_container->get('request'); // make sure request_var uses this request instance request_var('', 0, false, false, $request);