]> git.mxchange.org Git - friendica.git/commitdiff
refactor setup container for addons and logger
authorArt4 <art4@wlabs.de>
Thu, 26 Dec 2024 10:16:01 +0000 (10:16 +0000)
committerArt4 <art4@wlabs.de>
Thu, 26 Dec 2024 10:16:01 +0000 (10:16 +0000)
src/App.php

index 19376d4a19cc0801a6907220e6fcb5b0fc2074dc..7ff13e3e1b1428c264f31768fbfed85969cbbf89 100644 (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));