Skip to content

Commit

Permalink
r lumen 7.3.2+ support
Browse files Browse the repository at this point in the history
  • Loading branch information
dusterio committed Mar 18, 2020
1 parent 6b772df commit 220bf96
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,21 @@ $app->register(Laravel\Passport\PassportServiceProvider::class);
$app->register(Dusterio\LumenPassport\PassportServiceProvider::class);
```

### Using with Laravel Passport 7.3.2 and newer

Laravel Passport 7.3.2 had a breaking change - new method introduced on Application class that
exists in Laravel but not in Lumen. You could either lock in to an older version or
swap the Application class like follows at the top of your ```bootstrap/app.php``` file:

```php
$app = new \Dusterio\LumenPassport\Lumen7Application(
dirname(__DIR__)
);
```

If you look inside this class - all it does is adding an extra method configurationIsCached() that always
returns false.

### Migrate and install Laravel Passport

```bash
Expand Down
15 changes: 15 additions & 0 deletions src/Lumen7Application.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace Dusterio\LumenPassport;

use Laravel\Lumen\Application;

class Lumen7Application extends Application {
/**
* @return bool
*/
public function configurationIsCached()
{
return false;
}
}

0 comments on commit 220bf96

Please sign in to comment.