dusterio / lumen-passport

Making Laravel Passport work with Lumen
MIT License
655 stars 141 forks source link

No longer works after release of laravel/passport v7.3.2 ( undefined method Laravel\Lumen\Application::configurationIsCached() error ) #106

Closed picofaradpjf closed 5 years ago

picofaradpjf commented 5 years ago

Lumen version 5.8.10 dusterio/lumen-passport version 0.2.11

After composer update installed laravel/passport v7.3.2, my api crashes with the following error: Call to undefined method Laravel\Lumen\Application::configurationIsCached()

Only fix I could come up with was to add "laravel/passport": "7.3.1" to my top level composer.json file.

dusterio commented 5 years ago

@picofaradpjf you are right, thanks for reporting this. However, it seems the issue is in Laravel Passport, not in my package - this method is called directly from Laravel Passport.

I'm going to check if there is a possibility of a workaround in lumen-passport

tanthammar commented 5 years ago

Hello I have the same problem. Reported on Laravel Passport repository Also found this on the latest commit https://github.com/laravel/passport/commit/e260c865c218f00e4ad0c445dc45852e254d60c7#comments

tanthammar commented 5 years ago

Downgrade to Passport 7.3.1 resolves the issue ...

HoracioEspinosa commented 5 years ago

Downgrade to Passport 7.3.1 resolves the issue ...

Thanks, this works for me! 🥉

picofaradpjf commented 5 years ago

@dusterio Thanks for all your hard work on these packages. It is totally Laravel Passport's fault. Given their attitude is 'we will never support lumen, use laravel instead', I knew there was no point in complaining to them about it, and the only long term option will be to add a work around in lumen-passport.

dusterio commented 5 years ago

@picofaradpjf I'll make a workaround shortly!

It does make sense to use Laravel Passport with Lumen - I use it in several projects :)

dusterio commented 5 years ago

@picofaradpjf I added a workaround, seems to work fine and tests pass locally but for some reason fail on Travis CI, I'll check again later today

ulgeekiyanage commented 5 years ago

Downgrade to Passport 7.3.1 resolves the issue ...

This works for me also. Thanks! @dusterio This is issue is no longer available with the laravel passport 7.3.1. Hope you will fix this issue soon to work lumen passport with laravel passport 7.3.2 Thanks! :)

picofaradpjf commented 5 years ago

@dusterio Looks like they fixed this in Lumen 5.8.11 by adding the configurationIsCached function https://github.com/laravel/lumen-framework/commit/7e3ece68667d6fe1914fdc2d9c028a9a1e6b8a88

dusterio commented 5 years ago

@picofaradpjf so they do care about Lumen after all :))) I'm closing this issue and reverting my changes then

picofaradpjf commented 5 years ago

@dusterio I had a stray thought. Does this mean lumen passport is broken for anyone using a version of lumen less than 5.8.11? Maybe an update to the readme is needed? Could even add a blurb about "If you must use lumen < 5.8.11 be sure to install a version of laravel passport no higher higher than 7.3.1"

JuanDMeGon commented 4 years ago

It looks like it is back on Lumen 7? Can somebody confirm? As there is not configurationIsCached() method in the Application file causing the issue again with this version (7.x). It looks like we will be dancing around this. I tried to find in the file history when was this removed again but was not able to find it.

EDIT: I just confirmed is was resolved with Passport 8.4.2. Basically, we moved the solution from Lumen to Passport.