use Friendica\Core\Cache;
use Friendica\Core\Config\Factory\Config;
+use Friendica\Database\Definition\DbaDefinition;
+use Friendica\Database\Definition\ViewDefinition;
use Friendica\Test\DatabaseTestTrait;
use Friendica\Test\Util\Database\StaticDatabase;
use Friendica\Test\Util\VFSTrait;
$loader = (new Config())->createConfigFileLoader($this->root->url(), []);
$configCache = $configFactory->createCache($loader);
- $dba = new StaticDatabase($configCache, $profiler, $logger);
+ $dbaDefinition = (new DbaDefinition($configCache->get('system', 'basepath')))->load();
+ $viewDefinition = (new ViewDefinition($configCache->get('system', 'basepath')))->load();
+
+ $dba = new StaticDatabase($configCache, $profiler, $dbaDefinition, $viewDefinition, $logger);
$this->cache = new Cache\Type\DatabaseCache('database', $dba);
return $this->cache;
use Friendica\Core\Config\Factory\Config;
use Friendica\Core\Storage\Type\Database;
+use Friendica\Database\Definition\DbaDefinition;
+use Friendica\Database\Definition\ViewDefinition;
use Friendica\Test\DatabaseTestTrait;
use Friendica\Test\Util\Database\StaticDatabase;
use Friendica\Test\Util\VFSTrait;
$loader = (new Config())->createConfigFileLoader($this->root->url(), []);
$configCache = $configFactory->createCache($loader);
- $dba = new StaticDatabase($configCache, $profiler, $logger);
+ $dbaDefinition = (new DbaDefinition($configCache->get('system', 'basepath')))->load();
+ $viewDefinition = (new ViewDefinition($configCache->get('system', 'basepath')))->load();
+
+ $dba = new StaticDatabase($configCache, $profiler, $dbaDefinition, $viewDefinition, $logger);
return new Database($dba);
}
use Friendica\Core\Storage\Type\Filesystem;
use Friendica\Core\Storage\Type\SystemResource;
use Friendica\Database\Database;
+use Friendica\Database\Definition\DbaDefinition;
+use Friendica\Database\Definition\ViewDefinition;
use Friendica\DI;
use Friendica\Core\Config\Factory\Config;
use Friendica\Core\Config\Repository;
$loader = $configFactory->createConfigFileLoader($this->root->url(), []);
$configCache = $configFactory->createCache($loader);
- $this->dba = new StaticDatabase($configCache, $profiler, $this->logger);
+ $dbaDefinition = (new DbaDefinition($configCache->get('system', 'basepath')))->load();
+ $viewDefinition = (new ViewDefinition($configCache->get('system', 'basepath')))->load();
+
+ $this->dba = new StaticDatabase($configCache, $profiler, $dbaDefinition, $viewDefinition, $this->logger);
$configModel = new Repository\Config($this->dba, new Mode(Mode::DBCONFIGAVAILABLE));
$this->config = new PreloadConfig($configCache, $configModel);