Using console Symfony2 shortcuts to app/console in Windows

Hi,

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:

ConEmu

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:

2 comments
Ehsan Eskandari says 30 April 2016

nice, thank you for sharing

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

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

Reply
Add Your Reply