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
*/
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]);
+ });
}
/**