diff --git a/core/register_command.php b/core/register_command.php index d9e5dfcd775eb..04c6239015ea2 100644 --- a/core/register_command.php +++ b/core/register_command.php @@ -48,6 +48,8 @@ * along with this program. If not, see * */ + +use OCP\IAppConfig; use Psr\Log\LoggerInterface; $application->add(new \Stecman\Component\Symfony\Console\BashCompletion\CompletionCommand()); @@ -98,7 +100,7 @@ $application->add(new OC\Core\Command\Config\App\GetConfig(\OC::$server->getConfig())); $application->add(new OC\Core\Command\Config\App\SetConfig(\OC::$server->getConfig())); $application->add(new OC\Core\Command\Config\Import(\OC::$server->getConfig())); - $application->add(new OC\Core\Command\Config\ListConfigs(\OC::$server->getSystemConfig(), \OC::$server->getAppConfig())); + $application->add(new OC\Core\Command\Config\ListConfigs(\OC::$server->getSystemConfig(), \OC::$server->get(IAppConfig::class))); $application->add(new OC\Core\Command\Config\System\DeleteConfig(\OC::$server->getSystemConfig())); $application->add(new OC\Core\Command\Config\System\GetConfig(\OC::$server->getSystemConfig())); $application->add(new OC\Core\Command\Config\System\SetConfig(\OC::$server->getSystemConfig())); diff --git a/lib/private/legacy/OC_App.php b/lib/private/legacy/OC_App.php index ac449a62a4ffb..a3693de1864f5 100644 --- a/lib/private/legacy/OC_App.php +++ b/lib/private/legacy/OC_App.php @@ -56,6 +56,7 @@ use OCP\App\ManagerEvent; use OCP\Authentication\IAlternativeLogin; use OCP\EventDispatcher\IEventDispatcher; +use OCP\IAppConfig; use OCP\ILogger; use OC\AppFramework\Bootstrap\Coordinator; use OC\App\DependencyAnalyzer; @@ -731,7 +732,7 @@ public static function getAppVersions() { static $versions; if (!$versions) { - $appConfig = \OC::$server->getAppConfig(); + $appConfig = \OC::$server->get(IAppConfig::class); $versions = $appConfig->getValues(false, 'installed_version'); } return $versions;