From ccc66e912b171ba7bb4e5b4478508a22202eb356 Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Mon, 29 Jan 2024 15:12:53 +0100 Subject: fix: Use DI for Setup class and move away from deprecated methods MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- core/Command/Maintenance/Install.php | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'core/Command/Maintenance/Install.php') diff --git a/core/Command/Maintenance/Install.php b/core/Command/Maintenance/Install.php index f5d53c96234..4401921dacb 100644 --- a/core/Command/Maintenance/Install.php +++ b/core/Command/Maintenance/Install.php @@ -1,4 +1,7 @@ setName('maintenance:install') ->setDescription('install Nextcloud') @@ -76,15 +76,7 @@ class Install extends Command { protected function execute(InputInterface $input, OutputInterface $output): int { // validate the environment $server = \OC::$server; - $setupHelper = new Setup( - $this->config, - $this->iniGetWrapper, - $server->getL10N('lib'), - $server->query(Defaults::class), - $server->get(LoggerInterface::class), - $server->getSecureRandom(), - \OC::$server->query(Installer::class) - ); + $setupHelper = \OCP\Server::get(\OC\Setup::class); $sysInfo = $setupHelper->getSystemInfo(true); $errors = $sysInfo['errors']; if (count($errors) > 0) { -- cgit v1.2.3