Using console Symfony2 shortcuts to app/console in Windows


I`m developing using Symfony2 in Windows. I`m little tired still write “php app/console something…”. So I was wondering is there easier way. Should be possibilities to write aliases or shortcuts to console command.I`m using (instead windows cmd) ConEmu. It`s great replacement system cmd and easy way to use aliases to system commands.

So, run ConEmu (better with Admin privileges, for avoid problem with some Symfony2 commands). Go to settings->Startup->Environment. Add:

alias sf=php app/console $* --env=dev
alias sfp=php app/console $* --env=prod

like this:


Save settings and restart ConEmu. Should work.

Instead use “php app/console c:c” you can use “sf c:c” for dev environment and “sfp” for production.

Have fun 🙂

Leave a Comment:

Ehsan Eskandari says 30 April 2016

nice, thank you for sharing

ساخت سایت says 24 January 2018

It’s a great idea
Thank you for the hardships you have stretched

Add Your Reply