]> git.mxchange.org Git - friendica.git/commitdiff
BugFix: forgot configCache in ConfigFactory
authorPhilipp Holzer <admin+github@philipp.info>
Fri, 12 Jul 2019 21:05:48 +0000 (23:05 +0200)
committerPhilipp Holzer <admin+github@philipp.info>
Fri, 12 Jul 2019 21:05:48 +0000 (23:05 +0200)
src/Factory/ConfigFactory.php
src/Factory/DependencyFactory.php
tests/include/ApiTest.php
tests/src/Database/DBATest.php
tests/src/Database/DBStructureTest.php

index 3575ca63ea5f904d814bb599e4b30fbc9efc3145..7764d89900417c3d2499b3d171b15222b30197ac 100644 (file)
@@ -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
         */
@@ -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
         *
         * @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') {
                        $configAdapter = new Adapter\PreloadPConfigAdapter($uid);
@@ -58,7 +59,7 @@ class ConfigFactory
                        $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
                Core\PConfig::init($configuration);
index 607f34b9ee8d60ed40a6f0cde42fcbd3ed62f330..656a255b2ba2e4b782fb32b87cf79938cbfc4f53 100644 (file)
@@ -33,7 +33,7 @@ class DependencyFactory
                $database = Factory\DBFactory::init($configCache, $profiler, $_SERVER);
                $config = Factory\ConfigFactory::createConfig($configCache);
                // needed to call PConfig::init()
-               Factory\ConfigFactory::createPConfig(new PConfigCache());
+               Factory\ConfigFactory::createPConfig($configCache, new PConfigCache());
                $logger = Factory\LoggerFactory::create($channel, $database, $config, $profiler);
                Factory\LoggerFactory::createDev($channel, $config, $profiler);
                $baseURL = new BaseURL($config, $_SERVER);
index fb4bb585f91f355a386159779f1465da445147f2..94557ac69c234b46b78a1bb48f8608d9c94632f1 100644 (file)
@@ -57,7 +57,7 @@ class ApiTest extends DatabaseTest
                $profiler = Factory\ProfilerFactory::create($configCache);
                $database = Factory\DBFactory::init($configCache, $profiler, $_SERVER);
                $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);
                $baseUrl = new BaseURL($config, $_SERVER);
                $this->app = new App($database, $config, $mode, $router, $baseUrl, $logger, $profiler, false);
index 912c7f0f43a73a6c5fa551a38de71b37d51ca0f9..84d17dc899842577ba4beaa5bab27f946a2d861a 100644 (file)
@@ -22,7 +22,7 @@ class DBATest extends DatabaseTest
                $profiler = Factory\ProfilerFactory::create($configCache);
                $database = Factory\DBFactory::init($configCache, $profiler, $_SERVER);
                $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);
                $baseUrl = new BaseURL($config, $_SERVER);
                $this->app = new App($database, $config, $mode, $router, $baseUrl, $logger, $profiler, false);
index 266bd98745989e4f5ea65eab5702bda31f5a6c34..b005d8d53de60d5b897af99a4d620a6a77c570b7 100644 (file)
@@ -23,7 +23,7 @@ class DBStructureTest extends DatabaseTest
                $profiler = Factory\ProfilerFactory::create($configCache);
                $database = Factory\DBFactory::init($configCache, $profiler, $_SERVER);
                $config = Factory\ConfigFactory::createConfig($configCache);
-               Factory\ConfigFactory::createPConfig(new PConfigCache());
+               Factory\ConfigFactory::createPConfig($configCache, new PConfigCache());
                $logger = Factory\LoggerFactory::create('test', $database, $config, $profiler);
                $baseUrl = new BaseURL($config, $_SERVER);
                $this->app = new App($database, $config, $mode, $router, $baseUrl, $logger, $profiler, false);