Warning: You are browsing the documentation for version 2.8 which is not maintained anymore.
If some of your projects are still using this version, consider upgrading.
The Using Console Commands, Shortcuts and Built-in Commands page of the components documentation looks at the global console options. When you use the console as part of the full-stack framework, some additional global options are available as well.
By default, console commands run in the
dev environment and you may want
to change this for some commands. For example, you may want to run some commands
prod environment for performance reasons. Also, the result of some commands
will be different depending on the environment. For example, the
command will clear and warm the cache for the specified environment only. To
clear and warm the
prod cache you need to run:
$ php app/console cache:clear --env=prod
or the equivalent:
$ php app/console cache:clear -e prod
In addition to changing the environment, you can also choose to disable debug mode.
This can be useful where you want to run commands in the
but avoid the performance hit of collecting debug data:
$ php app/console list --no-debug