1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/14039] Revamp updater

PHPBB3-14039
This commit is contained in:
Mate Bartus
2015-07-24 09:20:50 +02:00
parent f1047ac854
commit 8f5a0ad6f7
94 changed files with 4514 additions and 263 deletions

View File

@@ -134,8 +134,13 @@ class container_factory
$this->request->enable_super_globals();
}
$this->container = $phpbb_container = $phpbb_container_builder
$other_config_path = $this->phpbb_root_path . 'install/update/new/config';
$config_path = (is_dir($other_config_path)) ? $other_config_path : $this->phpbb_root_path . 'config';
$this->container = $phpbb_container_builder
->with_environment('production')
->with_config($phpbb_config_php_file)
->with_config_path($config_path)
->without_cache()
->without_compiled_container()
->get_container();
@@ -145,11 +150,17 @@ class container_factory
$this->container->register('request')->setSynthetic(true);
$this->container->set('request', $this->request);
// Replace cache service, as config gets cached, and we don't want that
$this->container->register('cache.driver')->setSynthetic(true);
$this->container->set('cache.driver', new dummy());
// Replace cache service, as config gets cached, and we don't want that when we are installing
if (!is_dir($other_config_path))
{
$this->container->register('cache.driver')->setSynthetic(true);
$this->container->set('cache.driver', new dummy());
}
$this->container->compile();
$phpbb_container = $this->container;
// Restore super globals to previous state
if ($disable_super_globals)
{