diff --git a/console.php b/console.php index afa8b1b6be1..6bfbf964d94 100644 --- a/console.php +++ b/console.php @@ -1,4 +1,7 @@ getConfig(); + $config = \OCP\Server::get(\OCP\IConfig::class); set_exception_handler('exceptionHandler'); if (!function_exists('posix_getuid')) { @@ -102,14 +105,7 @@ try { echo "Additionally the function 'pcntl_signal' and 'pcntl_signal_dispatch' need to be enabled in your php.ini." . PHP_EOL; } - $application = new Application( - $config, - \OC::$server->get(\OCP\EventDispatcher\IEventDispatcher::class), - \OC::$server->getRequest(), - \OC::$server->get(\Psr\Log\LoggerInterface::class), - \OC::$server->query(\OC\MemoryInfo::class), - \OCP\Server::get(\OCP\App\IAppManager::class), - ); + $application = \OCP\Server::get(Application::class); $application->loadCommands(new ArgvInput(), new ConsoleOutput()); $application->run(); } catch (Exception $ex) { diff --git a/core/Command/App/Remove.php b/core/Command/App/Remove.php index d017a95c681..388f5603fe7 100644 --- a/core/Command/App/Remove.php +++ b/core/Command/App/Remove.php @@ -138,7 +138,7 @@ class Remove extends Command implements CompletionAwareInterface { */ public function completeArgumentValues($argumentName, CompletionContext $context): array { if ($argumentName === 'app-id') { - return $this->appManager->getInstalledApps(); + return $this->manager->getInstalledApps(); } return []; }