refactor setup container for addons and logger

This commit is contained in:
Art4 2024-12-26 10:16:01 +00:00
parent a2c4585914
commit 8ed5dd3a30

View file

@ -218,10 +218,9 @@ class App
public function processDaemon(array $options): 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' => [Logger\Capability\LogChannel::DAEMON]]);
$this->setupContainerForAddons();
$this->setupContainerForLogger(LogChannel::DAEMON);
DI::init($this->container);
\Friendica\Core\Logger\Handler\ErrorHandler::register($this->container->create(LoggerInterface::class));