Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Starting with Symfony2 and creating bundles

I am trying to start use Symfony2, and i have troubles with a first step. In the documentation I found

To create a bundle called AcmeHelloBundle (a play bundle that you'll build in this chapter), run the following command and follow the on-screen instructions (use all of the default options):

php app/console generate:bundle --namespace=Acme/HelloBundle
> --format=yml

and I really don’t understand where should I write this string? In which program or in which file?

like image 955
Shimon S Avatar asked Feb 22 '23 11:02

Shimon S


1 Answers

As Molecule Man said, it's a command line thing. But just to give a few more details:

  1. Open up a console window (also called a command prompt in Windows)

  2. Type "php --version" (no quotes). It should come back with a version number. If it says something like "can't find php" then you need to set a path to php.

  3. Change directory to your Symfony directory

  4. Type "php app/console" If everything is working then you will see a list of available commands. There are many things you can do from the command line.

  5. If you happen to be on a unix system then you can make console executable and just use "./app/console"

  6. Now try creating your bundle

like image 141
Cerad Avatar answered Feb 26 '23 17:02

Cerad