From: Christoph Wurst Date: Mon, 29 Jun 2020 14:09:58 +0000 (+0200) Subject: Use \OCP\IContainer::injectFn to boot the admin_audit app X-Git-Tag: v20.0.0beta1~319^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9993a3b839a4354a2ccf67d4aac53922c2de9b54;p=nextcloud-server.git Use \OCP\IContainer::injectFn to boot the admin_audit app Signed-off-by: Christoph Wurst --- diff --git a/apps/admin_audit/lib/AppInfo/Application.php b/apps/admin_audit/lib/AppInfo/Application.php index dde0605103c..6c79aef84c8 100644 --- a/apps/admin_audit/lib/AppInfo/Application.php +++ b/apps/admin_audit/lib/AppInfo/Application.php @@ -33,6 +33,7 @@ declare(strict_types=1); namespace OCA\AdminAudit\AppInfo; +use Closure; use OC\Files\Filesystem; use OC\Files\Node\File; use OC\Group\Manager; @@ -78,10 +79,9 @@ class Application extends App implements IBootstrap { } public function boot(IBootContext $context): void { - $logger = $this->getLogger( - $context->getAppContainer()->query(IConfig::class), - $context->getAppContainer()->query(ILogger::class), - $context->getAppContainer()->query(ILogFactory::class) + /** @var ILogger $logger */ + $logger = $context->injectFn( + Closure::fromCallable([$this, 'getLogger']) ); /*