Starting with Symfony2 and creating packages

I am trying to start using Symfony2 and I am having problems with the first step. In the documentation I found

To create a package called AcmeHelloBundle (the game kit you'll be in this chapter), run the following command and follow the on-screen instructions (use all the default options):

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

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

+4
source share
1 answer

As Molecule Man said, this is a command line matter. But just to give a few more details:

  • Open a console window (also called a command prompt on Windows)

  • Type "php -version" (without quotes). It should return with the version number. If he says something like "cannot find php", then you need to set the path to php.

  • Change directory in symfony directory

  • Enter "php app / console". If everything works, you will see a list of available commands. There are many things you can do from the command line.

  • If you are on a unix system, you can make a console executable and just use "./app/console"

  • Now try to create your package

+8
source

Source: https://habr.com/ru/post/1396607/


All Articles