Skip to content

Commit

Permalink
check if configuration is cached
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Jul 9, 2019
1 parent 19f8ef0 commit e260c86
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/PassportServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,13 @@ protected function registerMigrations()
*/
public function register()
{
$this->mergeConfigFrom(__DIR__.'/../config/passport.php', 'passport');
if (! $this->app->configurationIsCached()) {
$this->mergeConfigFrom(__DIR__.'/../config/passport.php', 'passport');
}

$this->registerAuthorizationServer();

$this->registerResourceServer();

$this->registerGuard();

$this->offerPublishing();
}

Expand Down

5 comments on commit e260c86

@nasrulhadi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @taylorotwell

Because check configuration is cached, i get error when call console php artisan on lumen 5.8

Call to undefined method Laravel\Lumen\Application::configurationIsCached()

@drbyte
Copy link

@drbyte drbyte commented on e260c86 Jul 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nasrulhadi you could probably just PR a fix that checks for Lumen. Be sure to include the URL to this commit for reference, and clearly explain (as you did above) in your PR what the problem is and why you're submitting the PR.

@tanthammar
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@driesvints
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don’t support Passport integration with Lumen. Please see https://lumen.laravel.com/docs/5.8#compatibility

It’s best that if you wish to use Passport that you use the Laravel framework instead.

@lloricode
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.