From cf6e2fa1b79c63581aa145d0a7c7ee2051fbbde2 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Wed, 31 May 2023 21:13:58 +0200 Subject: chore: Drop \OC_App::getAppVersion Signed-off-by: Christoph Wurst --- core/Command/App/Disable.php | 2 +- core/Command/App/Enable.php | 2 +- core/Command/App/Install.php | 3 ++- core/Command/App/Remove.php | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) (limited to 'core') diff --git a/core/Command/App/Disable.php b/core/Command/App/Disable.php index 05d35053b13..0ed4d29cf41 100644 --- a/core/Command/App/Disable.php +++ b/core/Command/App/Disable.php @@ -70,7 +70,7 @@ class Disable extends Command implements CompletionAwareInterface { try { $this->appManager->disableApp($appId); - $appVersion = \OC_App::getAppVersion($appId); + $appVersion = $this->appManager->getAppVersion($appId); $output->writeln($appId . ' ' . $appVersion . ' disabled'); } catch (\Exception $e) { $output->writeln($e->getMessage()); diff --git a/core/Command/App/Enable.php b/core/Command/App/Enable.php index c7a071e27b5..d50c8d79181 100644 --- a/core/Command/App/Enable.php +++ b/core/Command/App/Enable.php @@ -109,7 +109,7 @@ class Enable extends Command implements CompletionAwareInterface { } $installer->installApp($appId, $forceEnable); - $appVersion = \OC_App::getAppVersion($appId); + $appVersion = $this->appManager->getAppVersion($appId); if ($groupIds === []) { $this->appManager->enableApp($appId, $forceEnable); diff --git a/core/Command/App/Install.php b/core/Command/App/Install.php index a699a2e7af0..d87439b3664 100644 --- a/core/Command/App/Install.php +++ b/core/Command/App/Install.php @@ -28,6 +28,7 @@ namespace OC\Core\Command\App; use OC\Installer; +use OCP\App\IAppManager; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; @@ -89,7 +90,7 @@ class Install extends Command { return 1; } - $appVersion = \OC_App::getAppVersion($appId); + $appVersion = \OCP\Server::get(IAppManager::class)->getAppVersion($appId); $output->writeln($appId . ' ' . $appVersion . ' installed'); if (!$input->getOption('keep-disabled')) { diff --git a/core/Command/App/Remove.php b/core/Command/App/Remove.php index 2aa453132e4..ced17e3ef92 100644 --- a/core/Command/App/Remove.php +++ b/core/Command/App/Remove.php @@ -116,7 +116,7 @@ class Remove extends Command implements CompletionAwareInterface { return 1; } - $appVersion = \OC_App::getAppVersion($appId); + $appVersion = $this->manager->getAppVersion($appId); $output->writeln($appId . ' ' . $appVersion . ' removed'); return 0; -- cgit v1.2.3