extract setup of DI class

This commit is contained in:
Art4 2024-12-25 21:20:08 +00:00
parent d2f2d1d0b9
commit ce7fd1b0e2

View file

@ -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));