mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/11305] Create a normal container during final installation step.
The final step calls a bunch of code which expects a full phpBB runtime environment. Also, by this step everything should be configured and database schema set up. Therefore, in the final step replace installer container with a normal phpBB container. PHPBB3-11305
This commit is contained in:
parent
b94f9ae302
commit
8d3edd4128
2 changed files with 19 additions and 5 deletions
|
@ -101,9 +101,6 @@ $phpbb_container = phpbb_create_install_container($phpbb_root_path, $phpEx);
|
||||||
$phpbb_class_loader->set_cache($phpbb_container->get('cache.driver'));
|
$phpbb_class_loader->set_cache($phpbb_container->get('cache.driver'));
|
||||||
$phpbb_class_loader_ext->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');
|
|
||||||
|
|
||||||
$phpbb_dispatcher = $phpbb_container->get('dispatcher');
|
$phpbb_dispatcher = $phpbb_container->get('dispatcher');
|
||||||
$request = $phpbb_container->get('request');
|
$request = $phpbb_container->get('request');
|
||||||
|
|
||||||
|
|
|
@ -52,8 +52,8 @@ class install_install extends module
|
||||||
|
|
||||||
function main($mode, $sub)
|
function main($mode, $sub)
|
||||||
{
|
{
|
||||||
global $lang, $template, $language, $phpbb_root_path;
|
global $lang, $template, $language, $phpbb_root_path, $phpEx;
|
||||||
global $phpbb_container;
|
global $phpbb_container, $cache;
|
||||||
|
|
||||||
switch ($sub)
|
switch ($sub)
|
||||||
{
|
{
|
||||||
|
@ -102,6 +102,23 @@ class install_install extends module
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'final':
|
case 'final':
|
||||||
|
// Create a normal container now
|
||||||
|
$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
|
||||||
|
);
|
||||||
|
|
||||||
|
// Writes into global $cache
|
||||||
|
$cache = $phpbb_container->get('cache');
|
||||||
|
|
||||||
$this->build_search_index($mode, $sub);
|
$this->build_search_index($mode, $sub);
|
||||||
$this->add_modules($mode, $sub);
|
$this->add_modules($mode, $sub);
|
||||||
$this->add_language($mode, $sub);
|
$this->add_language($mode, $sub);
|
||||||
|
|
Loading…
Add table
Reference in a new issue