From ce7fd1b0e29252eaccff9c840860975ad1672a36 Mon Sep 17 00:00:00 2001 From: Art4 Date: Wed, 25 Dec 2024 21:20:08 +0000 Subject: [PATCH] extract setup of DI class --- src/App.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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));