In my quest to type less because I am getting lazy I am trying to automate as much as I can.
Something that is a bit tiresome in Symfony2 is to have to specify the --env flag for each run on the command-line if you do not wish to run in the default built-in dev environment.
Turns out there is an extremely simple way to override this:
In your ~/.profile (or ~/.bash_profile) simply add
1
| |
Any console command in your Symfony2 project will now run with –env=prod if you omit the flag.
Another useful thing to put in your ~/.profile is an alias for the app/console portion of your console command:
1 2 | |
Now, instead of having to type
1
| |
you can simply type
1
| |