From 220bf967b38d259daa11904ebf9c58d5aa3a74a6 Mon Sep 17 00:00:00 2001 From: Denis Mysenko Date: Wed, 18 Mar 2020 14:57:54 +1100 Subject: [PATCH] r lumen 7.3.2+ support --- README.md | 15 +++++++++++++++ src/Lumen7Application.php | 15 +++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 src/Lumen7Application.php diff --git a/README.md b/README.md index 8b5b89e..74d0691 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/Lumen7Application.php b/src/Lumen7Application.php new file mode 100644 index 0000000..07c2ad3 --- /dev/null +++ b/src/Lumen7Application.php @@ -0,0 +1,15 @@ +