]> git.mxchange.org Git - friendica.git/commitdiff
Merge branch 'refactor-entrypoint-auth_ejabberd.php' into refactor-entrypoint-console.php
authorArt4 <art4@wlabs.de>
Thu, 26 Dec 2024 17:03:42 +0000 (17:03 +0000)
committerArt4 <art4@wlabs.de>
Thu, 26 Dec 2024 17:03:42 +0000 (17:03 +0000)
1  2 
src/App.php

diff --cc src/App.php
index 0fcebd464ac76957cdb8b41daa799d88946bc89b,98c12cd5793e270c0c38747fa5ddb3ba05a5e179..b5bd34f57864c5ece5a8e82b2ff4c27f37bb4d57
@@@ -176,9 -170,11 +176,9 @@@ class Ap
        {
                $this->setupContainerForAddons();
  
 -              $this->container = $this->container->addRule(LoggerInterface::class,[
 -                      'constructParams' => [LogChannel::AUTH_JABBERED],
 -              ]);
 +              $this->setupContainerForLogger(LogChannel::AUTH_JABBERED);
  
-               $this->setupLegacyServerLocator();
+               $this->setupLegacyServiceLocator();
  
                $this->registerErrorHandler();
  
                }
        }
  
-               $this->setupLegacyServerLocator();
 +      public function processConsole(array $argv): void
 +      {
 +              $this->setupContainerForAddons();
 +
 +              $this->setupContainerForLogger(LogChannel::CONSOLE);
 +
++              $this->setupLegacyServiceLocator();
 +
 +              $this->registerErrorHandler();
 +
 +              $this->registerTemplateEngine();
 +
 +              (new \Friendica\Core\Console($this->container, $argv))->execute();
 +      }
 +
        private function setupContainerForAddons(): void
        {
                /** @var \Friendica\Core\Addon\Capability\ICanLoadAddons $addonLoader */
                $this->container = $this->container->addRules($addonLoader->getActiveAddonConfig('dependencies'));
        }
  
-       private function setupLegacyServerLocator(): void
 +      private function setupContainerForLogger(string $logChannel): void
 +      {
 +              $this->container = $this->container->addRule(LoggerInterface::class, [
 +                      'constructParams' => [$logChannel],
 +              ]);
 +      }
 +
+       private function setupLegacyServiceLocator(): void
        {
                \Friendica\DI::init($this->container);
        }