laravel / lumen-framework

The Laravel Lumen Framework.
https://lumen.laravel.com
MIT License
1.48k stars 419 forks source link

Dummy request never created for console command causing empty rootUrl #782

Closed Blizzke closed 6 years ago

Blizzke commented 6 years ago

Description:

I'm trying to generate URLs from a lumen command and the rootUrl is always empty.

I found that there is a setRequestForConsole called in the Kernel constructor that fakes a request and sets the base url, but this is done only if the request is not bound.

Unfortunately the request is always bound, bound is: either there is a binding, an actual instance or an alias in the container. Request is always defined as an alias, causing this line to never execute.

Steps To Reproduce:

None needed.

driesvints commented 6 years ago

Heya, think this was fixed with https://github.com/laravel/lumen-framework/pull/805

Let us know if the problem persists.