user6235604 user6235604 - 7 months ago 30
PHP Question

How to install symfony with composer?

I am using Windows 10
When I install symfony2 with:

composer create-project symfony/framework-standard-edition my_project_name


Error:

bash: composer: command not found

Answer

To downloads symfony, you need to download symfony.phar (a small file PHP) from this link.

  • Then, you have to move in your usual Web directory C:\wamp\www on windows and /var/www on Linux ;
  • Execute php symfony.phar new project_name_and_version for example : symfony.phar new symfony2.8 to download Symfony 2.8.

    Then, you can :

  • Change your current directory to /var/www/html/project_name on Linux or C:\wamp\www on windows;

  • Configure your application in app/config/parameters.yml file ;

  • And (always) read the documentation at http://symfony.com/doc.

Good luck ^^ !