-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: fix Lumen v5.5 compatibility #17
Conversation
@krisanalfa can you merge this PR? it's really useful :-) |
I second this - Please merge this PR For now as a workaround I have used the diff from this PR via the composer-patches package:
and added this to composer.json:
then removed the lumen-generator package:
and finally added it back with:
The patch is successfully applied if you see something like:
Note: I was still getting an issue with |
@barryrld for now, I'm using @joelhy's branch :-)
|
* fix `fire` method Lumen v5.5 compatibility According to https://laravel.com/docs/5.5/upgrade, the `fire` method has been changed to `handle` in Lumen v5.5, which break `lumen-generator` in Lumen v5.5. In Laravel v5.4 Illuminate/Console/Command.php Line 180, there is `handle` method support: ```php $method = method_exists($this, 'handle') ? 'handle' : 'fire'; ``` So it just need to change `fire` method name to `handle`. * fix `artisan route:list` Lumen v5.5 compatibility In Lumen v5.5 router methods is not directly attached to Application. To get `Router` object, we need to use `$app->router`. This fix add Lumen v5.5 compatibility support, and do not break Lumen v5.4 support.
c21ff71
to
f07a9ae
Compare
@barryrld @jgrossi |
Hi @joelhy thanks a lot for your contributions on this project. Cheers |
@aqidd |
Thanks!! |
fire
method Lumen v5.5 compatibilityAccording to https://laravel.com/docs/5.5/upgrade, the
fire
method has been changed tohandle
in Lumen v5.5,which break
lumen-generator
in Lumen v5.5.In Laravel v5.4 Illuminate/Console/Command.php Line 180, there is
handle
method support:So it just need to change
fire
method name tohandle
.artisan route:list
Lumen v5.5 compatibilityIn Lumen v5.5 router methods is not directly attached to Application. To get
Router
object, we need to use$app->router
.This fix add Lumen v5.5 compatibility support, and do not break Lumen v5.4 support.