mirror of
https://github.com/friendica/friendica
synced 2025-01-08 18:44:43 +00:00
Refactor App::processConsole()
This commit is contained in:
parent
f40b428ac2
commit
cf8ce380b7
1 changed files with 8 additions and 7 deletions
15
src/App.php
15
src/App.php
|
@ -192,14 +192,15 @@ class App
|
|||
|
||||
public function processConsole(array $argv): void
|
||||
{
|
||||
/** @var \Friendica\Core\Addon\Capability\ICanLoadAddons $addonLoader */
|
||||
$addonLoader = $this->container->create(\Friendica\Core\Addon\Capability\ICanLoadAddons::class);
|
||||
$this->container = $this->container->addRules($addonLoader->getActiveAddonConfig('dependencies'));
|
||||
$this->container = $this->container->addRule(LoggerInterface::class, ['constructParams' => [LogChannel::CONSOLE]]);
|
||||
$this->setupContainerForAddons();
|
||||
|
||||
/// @fixme Necessary until Hooks inside the Logger can get loaded without the DI-class
|
||||
DI::init($this->container);
|
||||
\Friendica\Core\Logger\Handler\ErrorHandler::register($this->container->create(\Psr\Log\LoggerInterface::class));
|
||||
$this->container = $this->container->addRule(LoggerInterface::class, [
|
||||
'constructParams' => [LogChannel::CONSOLE],
|
||||
]);
|
||||
|
||||
$this->setupLegacyServerLocator();
|
||||
|
||||
$this->registerErrorHandler();
|
||||
|
||||
(new \Friendica\Core\Console($this->container, $argv))->execute();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue