diff --git a/CHANGELOG.md b/CHANGELOG.md index 22d5ccd..c0f1819 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 2.0.2 + +- Bug #11: Fix missing ExceptionHandler concrete. + ## 2.0.1 - Allowed Laravel 7.x. diff --git a/src/Runtime/KernelRuntime.php b/src/Runtime/KernelRuntime.php deleted file mode 100644 index d8af653..0000000 --- a/src/Runtime/KernelRuntime.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @since 1.0.0 - */ -class KernelRuntime extends Kernel -{ - /** - * {@inheritdoc} - */ - protected $commandsLoaded = true; -} diff --git a/src/Runtime/RuntimeAutoload.php b/src/Runtime/RuntimeAutoload.php index da4116b..c387c2f 100644 --- a/src/Runtime/RuntimeAutoload.php +++ b/src/Runtime/RuntimeAutoload.php @@ -7,9 +7,7 @@ */ define('LARAVEL_START', microtime(true)); -use Illuminate\Contracts\Console\Kernel as KernelContract; use Illuminate\Foundation\Application; -use VXM\Async\Runtime\KernelRuntime; new class { /** @@ -52,7 +50,7 @@ protected function registerComposerAutoload(): void */ protected function boot(Application $app): void { - $app[KernelContract::class]->bootstrap(); + $app[Illuminate\Contracts\Console\Kernel::class]->bootstrap(); } /** @@ -67,7 +65,19 @@ protected function makeApplication(): Application } $app = new Application($basePath); - $app->singleton(KernelContract::class, KernelRuntime::class); + + $app->singleton( + Illuminate\Contracts\Console\Kernel::class, + class_exists(App\Console\Kernel::class) ? App\Console\Kernel::class : Illuminate\Foundation\Console\Kernel::class + ); + $app->singleton( + Illuminate\Contracts\Http\Kernel::class, + class_exists(App\Http\Kernel::class) ? App\Http\Kernel::class : Illuminate\Foundation\Http\Kernel::class + ); + $app->singleton( + Illuminate\Contracts\Debug\ExceptionHandler::class, + class_exists(App\Exceptions\Handler::class) ? App\Exceptions\Handler::class : Illuminate\Foundation\Exceptions\Handler::class + ); return $app; }