mirror of
https://github.com/friendica/friendica
synced 2025-04-22 03:50:11 +00:00
Replace Config-Cache dependency with Config-Model (no more DB-waiting necessary)
This commit is contained in:
parent
a6fb683bcd
commit
ab6efea9b2
18 changed files with 210 additions and 325 deletions
|
@ -21,7 +21,7 @@
|
|||
|
||||
namespace Friendica\Console;
|
||||
|
||||
use Friendica\Core\Config\ValueObject\Cache;
|
||||
use Friendica\Core\Config\Capability\IManageConfigValues;
|
||||
use Friendica\Core\Update;
|
||||
use Friendica\Database\Database;
|
||||
use Friendica\Database\DBStructure;
|
||||
|
@ -43,8 +43,8 @@ class DatabaseStructure extends \Asika\SimpleConsole\Console
|
|||
/** @var Database */
|
||||
private $dba;
|
||||
|
||||
/** @var Cache */
|
||||
private $configCache;
|
||||
/** @var IManageConfigValues */
|
||||
private $config;
|
||||
|
||||
/** @var DbaDefinition */
|
||||
private $dbaDefinition;
|
||||
|
@ -83,14 +83,14 @@ HELP;
|
|||
return $help;
|
||||
}
|
||||
|
||||
public function __construct(Database $dba, DbaDefinition $dbaDefinition, ViewDefinition $viewDefinition, BasePath $basePath, Cache $configCache, $argv = null)
|
||||
public function __construct(Database $dba, DbaDefinition $dbaDefinition, ViewDefinition $viewDefinition, BasePath $basePath, IManageConfigValues $config, $argv = null)
|
||||
{
|
||||
parent::__construct($argv);
|
||||
|
||||
$this->dba = $dba;
|
||||
$this->dbaDefinition = $dbaDefinition;
|
||||
$this->viewDefinition = $viewDefinition;
|
||||
$this->configCache = $configCache;
|
||||
$this->config = $config;
|
||||
$this->basePath = $basePath->getPath();
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ HELP;
|
|||
throw new RuntimeException('Unable to connect to database');
|
||||
}
|
||||
|
||||
$basePath = $this->configCache->get('system', 'basepath');
|
||||
$basePath = $this->config->get('system', 'basepath');
|
||||
|
||||
switch ($this->getArgument(0)) {
|
||||
case "dryrun":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue