How to execute Symfony Console command in any project subdirectory

With this script on your path, you can execute the command console  to execute the Symfony Console command in any of the project subdirectory.

Save the follow script as  console  (or choose other name, like “sf”) on /usr/local/bin or other location specified on your $PATH variable.

Remember to change the permissions to execute:

Now you can go to any subdirectory of your Symfony project and execute the console just typing “console”.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.