From: Art4 Date: Wed, 25 Dec 2024 21:20:08 +0000 (+0000) Subject: extract setup of DI class X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ce7fd1b0e29252eaccff9c840860975ad1672a36;p=friendica.git extract setup of DI class --- 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));