Util Symfony2 commands

It is always difficult to start with a framework. And Symfony2 is not an exception. But when you learn a 10% of offered utilities, you realize its power and the possibilities of improving your performance. For all those who are in this situation, they may will find useful a few commands that I’ve collected:

Create database with doctrine:
php app/console doctrine:database:create
Update database with doctrine:
php app/console doctrine:schema:update --force
Consult database mapping with doctrine:
php app/console doctrine:mapping:info
Create entity:
php app/console doctrine:generate:entity --entity="AcmeNameBundle:Name"
Create package:
php app/console generate:bundle --namespace=Acme/NameBundle
Install assetics in production:
php app/console assetic:dump --env=prod --no-debug
Install assets:
php app/console assets:install web
Clean cache in production:
php app/console cache:clear --env=prod --no-debug
Check available services:
php app/console container:debug

and the most important…

Check commands list
php app/console list

Leave a Reply

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