diff --git a/lib/private/Updater.php b/lib/private/Updater.php index 5a14bb1750779..3bdc667e581b4 100644 --- a/lib/private/Updater.php +++ b/lib/private/Updater.php @@ -48,6 +48,7 @@ use OCP\ILogger; use OCP\Util; use OC\App\AppManager; +use OC\App\AppStore\Fetcher\AppFetcher; use OC\DB\Connection; use OC\DB\MigrationService; use OC\DB\MigratorExecuteSqlEvent; @@ -272,7 +273,7 @@ private function doUpgrade(string $currentVersion, string $installedVersion): vo $this->doAppUpgrade(); // Update the appfetchers version so it downloads the correct list from the appstore - \OC::$server->getAppFetcher()->setVersion($currentVersion); + \OC::$server->get(AppFetcher::class)->setVersion($currentVersion); /** @var AppManager $appManager */ $appManager = \OC::$server->getAppManager(); diff --git a/tests/lib/InstallerTest.php b/tests/lib/InstallerTest.php index 60c8ac1cc947a..2e68e0de2fc62 100644 --- a/tests/lib/InstallerTest.php +++ b/tests/lib/InstallerTest.php @@ -51,7 +51,7 @@ protected function setUp(): void { $this->appstore = $config->setSystemValue('appstoreenabled', true); $config->setSystemValue('appstoreenabled', true); $installer = new Installer( - \OC::$server->getAppFetcher(), + \OC::$server->get(AppFetcher::class), \OC::$server->getHTTPClientService(), \OC::$server->getTempManager(), \OC::$server->get(LoggerInterface::class), @@ -74,7 +74,7 @@ protected function getInstaller() { protected function tearDown(): void { $installer = new Installer( - \OC::$server->getAppFetcher(), + \OC::$server->get(AppFetcher::class), \OC::$server->getHTTPClientService(), \OC::$server->getTempManager(), \OC::$server->get(LoggerInterface::class), @@ -98,7 +98,7 @@ public function testInstallApp() { // Install app $installer = new Installer( - \OC::$server->getAppFetcher(), + \OC::$server->get(AppFetcher::class), \OC::$server->getHTTPClientService(), \OC::$server->getTempManager(), \OC::$server->get(LoggerInterface::class),