From b5870d7f0ce6894acc1b5c7a4be3c08576af85f3 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Sun, 29 Mar 2020 19:25:43 +0800 Subject: [PATCH] Implement changes on 5.x to 4.x Signed-off-by: Mior Muhammad Zaki --- skeleton/bootstrap.php | 8 ++++---- skeleton/config/api.php | 2 +- src/Testing/Concerns/Testing.php | 2 -- src/Testing/TestCase.php | 2 ++ 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/skeleton/bootstrap.php b/skeleton/bootstrap.php index afc99309..90a1eb87 100644 --- a/skeleton/bootstrap.php +++ b/skeleton/bootstrap.php @@ -81,9 +81,9 @@ $app->register(Laravel\Lumen\Providers\FoundationServiceProvider::class); $app->register(Dingo\Api\Provider\LumenServiceProvider::class); // $app->register(Tymon\JWTAuth\Providers\LumenServiceProvider::class); -// $app->register(App\Lumen\Providers\AppServiceProvider::class); -// $app->register(App\Lumen\Providers\AuthServiceProvider::class); -// $app->register(App\Lumen\Providers\EventServiceProvider::class); +$app->register(App\Lumen\Providers\AppServiceProvider::class); +$app->register(App\Lumen\Providers\AuthServiceProvider::class); +$app->register(App\Lumen\Providers\EventServiceProvider::class); /* |-------------------------------------------------------------------------- @@ -96,7 +96,7 @@ | */ -$app->get('/', function () use ($app) { +$app->router->get('/', function () use ($app) { return $app->version(); }); diff --git a/skeleton/config/api.php b/skeleton/config/api.php index 38170356..84399ebc 100644 --- a/skeleton/config/api.php +++ b/skeleton/config/api.php @@ -193,7 +193,7 @@ | */ - 'transformer' => env('API_TRANSFORMER', Dingo\Api\Transformer\Adapter\Fractal::class), + 'transformer' => env('API_TRANSFORMER', Dingo\Api\Transformer\Adapter\Illuminate::class), /* |-------------------------------------------------------------------------- diff --git a/src/Testing/Concerns/Testing.php b/src/Testing/Concerns/Testing.php index e246d8de..b437f931 100644 --- a/src/Testing/Concerns/Testing.php +++ b/src/Testing/Concerns/Testing.php @@ -47,8 +47,6 @@ final protected function setUpTheTestEnvironment() { if (! $this->app) { $this->refreshApplication(); - - $this->app->make(ConsoleKernel::class); } $this->setUpTraits(); diff --git a/src/Testing/TestCase.php b/src/Testing/TestCase.php index cc9cdbfa..055acded 100644 --- a/src/Testing/TestCase.php +++ b/src/Testing/TestCase.php @@ -43,6 +43,8 @@ protected function refreshApplication() $this->app = $this->createApplication(); + $this->app->make(ConsoleKernel::class); + $url = $this->app->make('config')->get('app.url', 'http://localhost'); $this->app->make('url')->forceRootUrl($url);