X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=bin%2Fconsole.php;h=b797e6ba99a5d7800c5782eef97b8e18cc28d804;hb=2bb5785dfa062423044dc5782b2f7c01e1d1678a;hp=edfb8cd285f9c9f1194788c4994c4e5edd3170a8;hpb=4236a9a1059411c1d6483f772af30322ce713f0e;p=friendica.git diff --git a/bin/console.php b/bin/console.php index edfb8cd285..b797e6ba99 100755 --- a/bin/console.php +++ b/bin/console.php @@ -1,7 +1,7 @@ #!/usr/bin/env php addRules(include __DIR__ . '/../static/dependencies.config.php'); -$dice = $dice->addRule(LoggerInterface::class,['constructParams' => ['console']]); +/** @var \Friendica\Core\Addon\Capability\ICanLoadAddons $addonLoader */ +$addonLoader = $dice->create(\Friendica\Core\Addon\Capability\ICanLoadAddons::class); +$dice = $dice->addRules($addonLoader->getActiveAddonConfig('dependencies')); +$dice = $dice->addRule(LoggerInterface::class, ['constructParams' => [LogChannel::CONSOLE]]); +/// @fixme Necessary until Hooks inside the Logger can get loaded without the DI-class +DI::init($dice); \Friendica\Core\Logger\Handler\ErrorHandler::register($dice->create(\Psr\Log\LoggerInterface::class)); (new Friendica\Core\Console($dice, $argv))->execute();