From: Art4 Date: Mon, 23 Dec 2024 15:28:57 +0000 (+0000) Subject: Refactor App::setupContainerForRunningFrontend() X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3c4da64348d781f17ac9fb2e7135b4cb422d4147;p=friendica.git Refactor App::setupContainerForRunningFrontend() --- diff --git a/src/App.php b/src/App.php index e3a9ac0936..d8f28b89ba 100644 --- a/src/App.php +++ b/src/App.php @@ -158,12 +158,17 @@ class App { /** @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(\Friendica\App\Mode::class, ['call' => [['determineRunMode', [false, $request->getServerParams()], Dice::CHAIN_CALL]]]); + $this->container = $this->container->addRule(Mode::class, [ + 'call' => [ + ['determineRunMode', [false, $request->getServerParams()], Dice::CHAIN_CALL], + ], + ]); \Friendica\DI::init($this->container); - \Friendica\Core\Logger\Handler\ErrorHandler::register($this->container->create(\Psr\Log\LoggerInterface::class)); + \Friendica\Core\Logger\Handler\ErrorHandler::register($this->container->create(LoggerInterface::class)); } /**