Refactor App::setupContainerForRunningFrontend()

This commit is contained in:
Art4 2024-12-23 15:28:57 +00:00
parent 66822c6a81
commit 3c4da64348

View file

@ -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));
}
/**