]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use \OCP\IContainer::injectFn to boot the admin_audit app 21626/head
authorChristoph Wurst <christoph@winzerhof-wurst.at>
Mon, 29 Jun 2020 14:09:58 +0000 (16:09 +0200)
committerChristoph Wurst <christoph@winzerhof-wurst.at>
Fri, 3 Jul 2020 12:37:53 +0000 (14:37 +0200)
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
apps/admin_audit/lib/AppInfo/Application.php

index dde0605103cc9f0fb7bb681c2c7b8801b399a26c..6c79aef84c8ac2c23d6e1cd39d6112248139609f 100644 (file)
@@ -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'])
                );
 
                /*