From 8ed5dd3a30b5e46aa88e5e3f50a5061ef853de45 Mon Sep 17 00:00:00 2001 From: Art4 Date: Thu, 26 Dec 2024 10:16:01 +0000 Subject: [PATCH] refactor setup container for addons and logger --- src/App.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/App.php b/src/App.php index 19376d4a19..7ff13e3e1b 100644 --- a/src/App.php +++ b/src/App.php @@ -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));