Skip to content

Commit

Permalink
Merge pull request #12 from vuongxuongminh/2.0
Browse files Browse the repository at this point in the history
2.0.2
  • Loading branch information
vuongxuongminh authored Jul 1, 2020
2 parents 0fdb0ff + 2124a3c commit c4ee6d6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 27 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2.0.2

- Bug #11: Fix missing ExceptionHandler concrete.

## 2.0.1

- Allowed Laravel 7.x.
Expand Down
23 changes: 0 additions & 23 deletions src/Runtime/KernelRuntime.php

This file was deleted.

18 changes: 14 additions & 4 deletions src/Runtime/RuntimeAutoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
/**
Expand Down Expand Up @@ -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();
}

/**
Expand All @@ -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;
}
Expand Down

0 comments on commit c4ee6d6

Please sign in to comment.