Call App::load() on App::processConsole() and procesEjabberd()

This commit is contained in:
Art4 2025-01-22 13:53:30 +00:00
parent c9bcc45d7c
commit 5a40fdd7e1
2 changed files with 22 additions and 2 deletions

View file

@ -52,4 +52,4 @@ $container = \Friendica\Core\DiceContainer::fromBasePath(dirname(__DIR__));
$app = \Friendica\App::fromContainer($container); $app = \Friendica\App::fromContainer($container);
$app->processEjabberd(); $app->processEjabberd($_SERVER);

View file

@ -194,12 +194,22 @@ class App
$this->registerErrorHandler(); $this->registerErrorHandler();
$this->load(
$serverParams,
$this->container->create(DbaDefinition::class),
$this->container->create(ViewDefinition::class),
$this->container->create(Mode::class),
$this->container->create(IManageConfigValues::class),
$this->container->create(Profiler::class),
$this->container->create(AppHelper::class),
);
$this->registerTemplateEngine(); $this->registerTemplateEngine();
(\Friendica\Core\Console::create($this->container, $argv))->execute(); (\Friendica\Core\Console::create($this->container, $argv))->execute();
} }
public function processEjabberd(): void public function processEjabberd(array $serverParams): void
{ {
$this->setupContainerForAddons(); $this->setupContainerForAddons();
@ -209,6 +219,16 @@ class App
$this->registerErrorHandler(); $this->registerErrorHandler();
$this->load(
$serverParams,
$this->container->create(DbaDefinition::class),
$this->container->create(ViewDefinition::class),
$this->container->create(Mode::class),
$this->container->create(IManageConfigValues::class),
$this->container->create(Profiler::class),
$this->container->create(AppHelper::class),
);
/** @var BasePath */ /** @var BasePath */
$basePath = $this->container->create(BasePath::class); $basePath = $this->container->create(BasePath::class);