This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Understanding commands being used by Symfony2 in comand line

About symfony tutorials, symfony book and API documentation.

Understanding commands being used by Symfony2 in comand line

by labeeb » Fri Aug 23, 2013 2:16 am

I have not used command line many times before :?~:-?~:???: ,I am Windows user and as it clear that composer is frequently used in symfony2 and this situation is very problematic for me, I want to have some guidance regarding the language or commands( or whatever it is)being used by composer.How can I learn about these commands at least those commands which are most frequently used by symfony2. If possible please mention some resources for learning and at least show me a path what should I be learning to overcome this deficiency. :cry:
Thanks in advance
labeeb
Junior Member
 
Posts: 1
Joined: Wed Aug 21, 2013 8:03 am

Re: Understanding commands being used by Symfony2 in comand

by kanel » Tue Jun 24, 2014 12:04 pm

Please check out my collection .

1)Installing Symfony2
composer create-project symfony/framework-standard-edition myproject/ ~2.5

2)Running Symfony2
php app/console server:run

3) Creating the bundle
php app/console generate:bundle --namespace=Blogger/BlogBundle --format=yml


4) In order for the asset function to correctly link up the the resource we need to copy over or link the bundle resources into the applications web folder. This can be done with the following
php app/console assets:install web --symlink


If you are using an Operating System that doesn’t support symlinks such as Windows you will need to drop the symlink option as follows.

php app/console assets:install web

5) we have told Doctrine 2 how to map the entity members, we can generate the accessor methods using the following.

php app/console doctrine:generate:entities MyEnity



6) Creating the database
php app/console doctrine:database:create


To create the our table in our database we can run the following doctrine task.

php app/console doctrine:schema:create


or for help
php app/console doctrine:schema:create --help

7) update the vendors to reflect these changes.

php composer.phar update


8) Loading the fixtures
php app/console doctrine:fixtures:load

9) we need to update the database to reflect the changes to our entities. We could use the doctrine:schema:update
php app/console doctrine:schema:update --force

10) Run the following 2 commands to update the database schema.

php app/console doctrine:migrations:diff
php app/console doctrine:migrations:migrate

11) Running in Production
php app/console cache:clear --env=prod


12)Dumping the assets for production

app/console --env=prod assetic:dump
kanel
Junior Member
 
Posts: 5
Joined: Thu Jun 19, 2014 11:39 am