From 81c0c56e5a97e1eb75a3217476373a346556d7ac Mon Sep 17 00:00:00 2001 From: Art4 Date: Sun, 10 Nov 2024 08:46:50 +0000 Subject: [PATCH] Replace calls for App with AppHelper in Module\Install --- src/Module/Install.php | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/Module/Install.php b/src/Module/Install.php index f9d9782250..4907f31860 100644 --- a/src/Module/Install.php +++ b/src/Module/Install.php @@ -7,10 +7,14 @@ namespace Friendica\Module; -use Friendica\App; +use Friendica\App\Arguments; +use Friendica\App\BaseURL; +use Friendica\App\Mode; +use Friendica\AppHelper; use Friendica\BaseModule; use Friendica\Core; use Friendica\Core\Config\ValueObject\Cache; +use Friendica\Core\Installer; use Friendica\Core\L10n; use Friendica\Core\Renderer; use Friendica\Core\Theme; @@ -51,20 +55,20 @@ class Install extends BaseModule private $currentWizardStep; /** - * @var Core\Installer The installer + * @var Installer The installer */ private $installer; - /** @var App */ - protected $app; - /** @var App\Mode */ + /** @var AppHelper */ + protected $appHelper; + /** @var Mode */ protected $mode; - public function __construct(App $app, BasePath $basePath, App\Mode $mode, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, Core\Installer $installer, array $server, array $parameters = []) + public function __construct(AppHelper $appHelper, BasePath $basePath, Mode $mode, L10n $l10n, BaseURL $baseUrl, Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, Installer $installer, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); - $this->app = $app; + $this->appHelper = $appHelper; $this->mode = $mode; $this->installer = $installer; @@ -80,7 +84,7 @@ class Install extends BaseModule } // get basic installation information and save them to the config cache - $configCache = $this->app->getConfigCache(); + $configCache = $this->appHelper->getConfigCache(); $this->installer->setUpCache($configCache, $basePath->getPath()); // We overwrite current theme css, because during install we may not have a working mod_rewrite @@ -92,7 +96,7 @@ class Install extends BaseModule protected function post(array $request = []) { - $configCache = $this->app->getConfigCache(); + $configCache = $this->appHelper->getConfigCache(); switch ($this->currentWizardStep) { case self::SYSTEM_CHECK: @@ -168,7 +172,7 @@ class Install extends BaseModule protected function content(array $request = []): string { - $configCache = $this->app->getConfigCache(); + $configCache = $this->appHelper->getConfigCache(); $output = '';