]> BookStack Code Mirror - bookstack/blobdiff - app/Theming/ThemeService.php
Updated minimum php version from 7.3 to 7.4
[bookstack] / app / Theming / ThemeService.php
index f0f8f033c4d9c4542259906835cb1bf98d4651a3..275dc9d8c94d421fa4af8467e98146e73fa4404b 100644 (file)
@@ -3,7 +3,8 @@
 namespace BookStack\Theming;
 
 use BookStack\Auth\Access\SocialAuthService;
-use Illuminate\Contracts\Console\Kernel;
+use Illuminate\Console\Application;
+use Illuminate\Console\Application as Artisan;
 use Symfony\Component\Console\Command\Command;
 
 class ThemeService
@@ -50,9 +51,9 @@ class ThemeService
      */
     public function registerCommand(Command $command)
     {
-        /** @var \Illuminate\Foundation\Console\Kernel $consoleKernel */
-        $consoleKernel = app()->make(Kernel::class);
-        $consoleKernel->registerCommand($command);
+        Artisan::starting(function (Application $application) use ($command) {
+            $application->addCommands([$command]);
+        });
     }
 
     /**