diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2023-06-06 11:09:24 +0200 |
---|---|---|
committer | Christoph Wurst <ChristophWurst@users.noreply.github.com> | 2023-07-06 15:21:22 +0200 |
commit | 14719110b9c795a95b23c2278168b9d6123b1a62 (patch) | |
tree | 9919ba8c849e3397e23e46ad9f1fdc3f951d3a7f /lib/private/Console | |
parent | 5538a40029da60547798ae6f9e11179c4ee4a642 (diff) | |
download | nextcloud-server-14719110b9c795a95b23c2278168b9d6123b1a62.tar.gz nextcloud-server-14719110b9c795a95b23c2278168b9d6123b1a62.zip |
chore: Replace \OC::$server->query with \OCP\Server::get in /lib
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/Console')
-rw-r--r-- | lib/private/Console/Application.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Console/Application.php b/lib/private/Console/Application.php index 11515f26866..113f0507ef5 100644 --- a/lib/private/Console/Application.php +++ b/lib/private/Console/Application.php @@ -33,12 +33,12 @@ namespace OC\Console; use OC\MemoryInfo; use OC\NeedsUpdateException; use OC_App; -use OCP\AppFramework\QueryException; use OCP\App\IAppManager; use OCP\Console\ConsoleEvent; use OCP\EventDispatcher\IEventDispatcher; use OCP\IConfig; use OCP\IRequest; +use Psr\Container\ContainerExceptionInterface; use Psr\Log\LoggerInterface; use Symfony\Component\Console\Application as SymfonyApplication; use Symfony\Component\Console\Input\InputInterface; @@ -216,8 +216,8 @@ class Application { private function loadCommandsFromInfoXml($commands) { foreach ($commands as $command) { try { - $c = \OC::$server->query($command); - } catch (QueryException $e) { + $c = \OCP\Server::get($command); + } catch (ContainerExceptionInterface $e) { if (class_exists($command)) { try { $c = new $command(); |