Skip to content
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

[5.8] Allow console environment argument to be separated with a space #28869

merged 1 commit into from Jun 17, 2019


None yet
2 participants
Copy link

commented Jun 17, 2019

Following explanations are from @matt-allan in the issue #28831:

The Symfony console component that is used by the Artisan console allows separating option names and values with either a space or an equals (=) sign. For example:

$ php artisan serve --port=9090 
Laravel development server started: <>
$ php artisan serve --port 9090 
Laravel development server started: <>

However, the --env option is only parsed correctly if you use an equals sign. If you use a space app()->environment() will return false.

This inconsistency is pretty confusing and difficult to debug. If you dump $this->option('env') in a command it will return the expected value but app()->environment() will return false.

Fixes #28831

@taylorotwell taylorotwell merged commit 85137e0 into laravel:5.8 Jun 17, 2019

2 checks passed

continuous-integration/styleci/pr The analysis has passed
continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.