AnchovyLegend AnchovyLegend - 3 months ago 19
PHP Question

Symfony 2 - Generating a Bundle (Windows)

I am new to Symfony. I am running Windows and am using xammp to learn Symfony 2. How would I run the following command? I seem to be getting an error and not sure how to run commands like these successfully. I appreciate any suggestions. Must I use CMD to create a bundle for Symfony2? Is there an easier way to generate a bundle?

$ php app/console generate:bundle --namespace=Blogger/BlogBundle --format=yml

Answer

Using the CLI tools is the easiest way to generate a bundle and many other things in symfony2.

Make sure you are in the root of your app to use the php app/console utility. If you 'dir', then you should see something like:-

28/09/2013  18:13    <DIR>          .
28/09/2013  18:13    <DIR>          ..
25/03/2013  12:50    <DIR>          app
01/03/2013  23:40             1,790 composer.json
09/03/2013  20:28            39,452 composer.lock
24/07/2013  12:41    <DIR>          data
01/03/2013  23:40             1,084 LICENSE
01/03/2013  23:40             6,202 README.md
01/03/2013  23:40    <DIR>          src
01/03/2013  23:40             8,393 UPGRADE.md
02/03/2013  13:29    <DIR>          vendor
07/04/2013  17:12    <DIR>          web