diff --git a/src/App.php b/src/App.php index 691bab75eb..ecfaec370c 100644 --- a/src/App.php +++ b/src/App.php @@ -123,7 +123,15 @@ class App public function processRequest(ServerRequestInterface $request, float $start_time): void { - $this->setupContainerForRunningFrontend($request); + $this->setupContainerForAddons(); + + $this->container = $this->container->addRule(Mode::class, [ + 'call' => [ + ['determineRunMode', [false, $request->getServerParams()], Dice::CHAIN_CALL], + ], + ]); + + $this->setupLegacyServerLocator(); $this->registerErrorHandler(); @@ -182,19 +190,6 @@ class App } } - private function setupContainerForRunningFrontend(ServerRequestInterface $request): void - { - $this->setupContainerForAddons(); - - $this->container = $this->container->addRule(Mode::class, [ - 'call' => [ - ['determineRunMode', [false, $request->getServerParams()], Dice::CHAIN_CALL], - ], - ]); - - $this->setupLegacyServerLocator(); - } - private function setupContainerForAddons(): void { /** @var \Friendica\Core\Addon\Capability\ICanLoadAddons $addonLoader */