diff --git a/src/App.php b/src/App.php index 415aeeabe0..691bab75eb 100644 --- a/src/App.php +++ b/src/App.php @@ -166,7 +166,7 @@ class App 'constructParams' => [LogChannel::AUTH_JABBERED], ]); - \Friendica\DI::init($this->container); + $this->setupLegacyServerLocator(); $this->registerErrorHandler(); @@ -192,7 +192,7 @@ class App ], ]); - \Friendica\DI::init($this->container); + $this->setupLegacyServerLocator(); } private function setupContainerForAddons(): void @@ -203,6 +203,11 @@ class App $this->container = $this->container->addRules($addonLoader->getActiveAddonConfig('dependencies')); } + private function setupLegacyServerLocator(): void + { + \Friendica\DI::init($this->container); + } + private function registerErrorHandler(): void { \Friendica\Core\Logger\Handler\ErrorHandler::register($this->container->create(LoggerInterface::class));