X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/cb30c258df2215ba73364cc6df9f3741f603d6a5..refs/pull/4467/head:/app/Theming/ThemeService.php diff --git a/app/Theming/ThemeService.php b/app/Theming/ThemeService.php index f0f8f033c..bb91643e3 100644 --- a/app/Theming/ThemeService.php +++ b/app/Theming/ThemeService.php @@ -2,8 +2,9 @@ namespace BookStack\Theming; -use BookStack\Auth\Access\SocialAuthService; -use Illuminate\Contracts\Console\Kernel; +use BookStack\Access\SocialAuthService; +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]); + }); } /**