X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/cb30c258df2215ba73364cc6df9f3741f603d6a5..refs/pull/3210/head:/app/Theming/ThemeService.php diff --git a/app/Theming/ThemeService.php b/app/Theming/ThemeService.php index f0f8f033c..275dc9d8c 100644 --- a/app/Theming/ThemeService.php +++ b/app/Theming/ThemeService.php @@ -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]); + }); } /**