BugFix: forgot configCache in ConfigFactory
This commit is contained in:
parent
c82127ffb7
commit
a30200083a
5 changed files with 9 additions and 8 deletions
|
@ -24,7 +24,7 @@ class ConfigFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Cache\ConfigCache $configCache The config cache of this adapter
|
* @param Cache\ConfigCache $configCache The config cache
|
||||||
*
|
*
|
||||||
* @return Config\Configuration
|
* @return Config\Configuration
|
||||||
*/
|
*/
|
||||||
|
@ -45,12 +45,13 @@ class ConfigFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Cache\PConfigCache $configCache The config cache of this adapter
|
* @param Cache\ConfigCache $configCache The config cache
|
||||||
|
* @param Cache\PConfigCache $pConfigCache The personal config cache
|
||||||
* @param int $uid The UID of the current user
|
* @param int $uid The UID of the current user
|
||||||
*
|
*
|
||||||
* @return Config\PConfiguration
|
* @return Config\PConfiguration
|
||||||
*/
|
*/
|
||||||
public static function createPConfig(Cache\PConfigCache $configCache, $uid = null)
|
public static function createPConfig(Cache\ConfigCache $configCache, Cache\PConfigCache $pConfigCache, $uid = null)
|
||||||
{
|
{
|
||||||
if ($configCache->get('system', 'config_adapter') === 'preload') {
|
if ($configCache->get('system', 'config_adapter') === 'preload') {
|
||||||
$configAdapter = new Adapter\PreloadPConfigAdapter($uid);
|
$configAdapter = new Adapter\PreloadPConfigAdapter($uid);
|
||||||
|
@ -58,7 +59,7 @@ class ConfigFactory
|
||||||
$configAdapter = new Adapter\JITPConfigAdapter();
|
$configAdapter = new Adapter\JITPConfigAdapter();
|
||||||
}
|
}
|
||||||
|
|
||||||
$configuration = new Config\PConfiguration($configCache, $configAdapter);
|
$configuration = new Config\PConfiguration($pConfigCache, $configAdapter);
|
||||||
|
|
||||||
// Set the config in the static container for legacy usage
|
// Set the config in the static container for legacy usage
|
||||||
Core\PConfig::init($configuration);
|
Core\PConfig::init($configuration);
|
||||||
|
|
|
@ -33,7 +33,7 @@ class DependencyFactory
|
||||||
$database = Factory\DBFactory::init($configCache, $profiler, $_SERVER);
|
$database = Factory\DBFactory::init($configCache, $profiler, $_SERVER);
|
||||||
$config = Factory\ConfigFactory::createConfig($configCache);
|
$config = Factory\ConfigFactory::createConfig($configCache);
|
||||||
// needed to call PConfig::init()
|
// needed to call PConfig::init()
|
||||||
Factory\ConfigFactory::createPConfig(new PConfigCache());
|
Factory\ConfigFactory::createPConfig($configCache, new PConfigCache());
|
||||||
$logger = Factory\LoggerFactory::create($channel, $database, $config, $profiler);
|
$logger = Factory\LoggerFactory::create($channel, $database, $config, $profiler);
|
||||||
Factory\LoggerFactory::createDev($channel, $config, $profiler);
|
Factory\LoggerFactory::createDev($channel, $config, $profiler);
|
||||||
$baseURL = new BaseURL($config, $_SERVER);
|
$baseURL = new BaseURL($config, $_SERVER);
|
||||||
|
|
|
@ -57,7 +57,7 @@ class ApiTest extends DatabaseTest
|
||||||
$profiler = Factory\ProfilerFactory::create($configCache);
|
$profiler = Factory\ProfilerFactory::create($configCache);
|
||||||
$database = Factory\DBFactory::init($configCache, $profiler, $_SERVER);
|
$database = Factory\DBFactory::init($configCache, $profiler, $_SERVER);
|
||||||
$config = Factory\ConfigFactory::createConfig($configCache);
|
$config = Factory\ConfigFactory::createConfig($configCache);
|
||||||
Factory\ConfigFactory::createPConfig(new Config\Cache\PConfigCache());
|
Factory\ConfigFactory::createPConfig($configCache, new Config\Cache\PConfigCache());
|
||||||
$logger = Factory\LoggerFactory::create('test', $database, $config, $profiler);
|
$logger = Factory\LoggerFactory::create('test', $database, $config, $profiler);
|
||||||
$baseUrl = new BaseURL($config, $_SERVER);
|
$baseUrl = new BaseURL($config, $_SERVER);
|
||||||
$this->app = new App($database, $config, $mode, $router, $baseUrl, $logger, $profiler, false);
|
$this->app = new App($database, $config, $mode, $router, $baseUrl, $logger, $profiler, false);
|
||||||
|
|
|
@ -22,7 +22,7 @@ class DBATest extends DatabaseTest
|
||||||
$profiler = Factory\ProfilerFactory::create($configCache);
|
$profiler = Factory\ProfilerFactory::create($configCache);
|
||||||
$database = Factory\DBFactory::init($configCache, $profiler, $_SERVER);
|
$database = Factory\DBFactory::init($configCache, $profiler, $_SERVER);
|
||||||
$config = Factory\ConfigFactory::createConfig($configCache);
|
$config = Factory\ConfigFactory::createConfig($configCache);
|
||||||
Factory\ConfigFactory::createPConfig(new Config\Cache\PConfigCache());
|
Factory\ConfigFactory::createPConfig($configCache, new Config\Cache\PConfigCache());
|
||||||
$logger = Factory\LoggerFactory::create('test', $database, $config, $profiler);
|
$logger = Factory\LoggerFactory::create('test', $database, $config, $profiler);
|
||||||
$baseUrl = new BaseURL($config, $_SERVER);
|
$baseUrl = new BaseURL($config, $_SERVER);
|
||||||
$this->app = new App($database, $config, $mode, $router, $baseUrl, $logger, $profiler, false);
|
$this->app = new App($database, $config, $mode, $router, $baseUrl, $logger, $profiler, false);
|
||||||
|
|
|
@ -23,7 +23,7 @@ class DBStructureTest extends DatabaseTest
|
||||||
$profiler = Factory\ProfilerFactory::create($configCache);
|
$profiler = Factory\ProfilerFactory::create($configCache);
|
||||||
$database = Factory\DBFactory::init($configCache, $profiler, $_SERVER);
|
$database = Factory\DBFactory::init($configCache, $profiler, $_SERVER);
|
||||||
$config = Factory\ConfigFactory::createConfig($configCache);
|
$config = Factory\ConfigFactory::createConfig($configCache);
|
||||||
Factory\ConfigFactory::createPConfig(new PConfigCache());
|
Factory\ConfigFactory::createPConfig($configCache, new PConfigCache());
|
||||||
$logger = Factory\LoggerFactory::create('test', $database, $config, $profiler);
|
$logger = Factory\LoggerFactory::create('test', $database, $config, $profiler);
|
||||||
$baseUrl = new BaseURL($config, $_SERVER);
|
$baseUrl = new BaseURL($config, $_SERVER);
|
||||||
$this->app = new App($database, $config, $mode, $router, $baseUrl, $logger, $profiler, false);
|
$this->app = new App($database, $config, $mode, $router, $baseUrl, $logger, $profiler, false);
|
||||||
|
|
Loading…
Reference in a new issue