diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2024-01-11 15:32:58 -0100 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2024-01-15 15:45:13 -0100 |
commit | f7d0c74b1003af6c47dd6ec74f4ef904a2681d62 (patch) | |
tree | a0bfe1934fbec0ccf6651824589a0e67ae4f9d9f /core/Command/Upgrade.php | |
parent | e5ef58b7b9b8f7a232666df17d286d43fb4d1201 (diff) | |
download | nextcloud-server-f7d0c74b1003af6c47dd6ec74f4ef904a2681d62.tar.gz nextcloud-server-f7d0c74b1003af6c47dd6ec74f4ef904a2681d62.zip |
lazy AppConfig
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'core/Command/Upgrade.php')
-rw-r--r-- | core/Command/Upgrade.php | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/core/Command/Upgrade.php b/core/Command/Upgrade.php index 30acd8f7d4d..c74b8d27049 100644 --- a/core/Command/Upgrade.php +++ b/core/Command/Upgrade.php @@ -35,7 +35,6 @@ namespace OC\Core\Command; use OC\Console\TimestampFormatter; use OC\DB\MigratorExecuteSqlEvent; -use OC\Installer; use OC\Repair\Events\RepairAdvanceEvent; use OC\Repair\Events\RepairErrorEvent; use OC\Repair\Events\RepairFinishEvent; @@ -48,7 +47,6 @@ use OCP\EventDispatcher\Event; use OCP\EventDispatcher\IEventDispatcher; use OCP\IConfig; use OCP\Util; -use Psr\Log\LoggerInterface; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\ProgressBar; use Symfony\Component\Console\Input\InputInterface; @@ -63,9 +61,7 @@ class Upgrade extends Command { public const ERROR_FAILURE = 5; public function __construct( - private IConfig $config, - private LoggerInterface $logger, - private Installer $installer, + private IConfig $config ) { parent::__construct(); } @@ -91,12 +87,7 @@ class Upgrade extends Command { } $self = $this; - $updater = new Updater( - $this->config, - \OC::$server->getIntegrityCodeChecker(), - $this->logger, - $this->installer - ); + $updater = \OCP\Server::get(Updater::class); /** @var IEventDispatcher $dispatcher */ $dispatcher = \OC::$server->get(IEventDispatcher::class); |