1

I want to use composer with symfony2 my questions are : 1-Where should I install composer ? inside of symfony folder ? other folder such as /bin ? 2- where do I configure composer.json ? 3- should I specify the folder where I'll install a bundle in , in the json file ?

Excuse me, but the official documentation doesn't offer a detailed explanation ..

2
  • getcomposer.org is quite clear - install it both in your dev and prod env, then you just need to run composer install from the root folder of the project, location where the composer.json file should lie. Commented Jan 1, 2014 at 12:15
  • I'm sorry I'll have to ask more stupid questions : How can I install it in Prod env and dev env ? Commented Jan 1, 2014 at 12:18

1 Answer 1

2

I tend to install composer globally. From your home dir, execute the following:

$ curl -sS https://getcomposer.org/installer | php
$ mv composer.phar /usr/local/bin/composer

Source: http://getcomposer.org/doc/00-intro.md#globally

Now you should have composer executable from anywhere. You may now go to your Symfony2 dir and run composer install.

Sign up to request clarification or add additional context in comments.

5 Comments

Ok, here is my feedback : I can't execute composer from /usr/share/nginx/www/project/ I need to specify the folder where i Have composer.
What do you mean "cant execute"? What exactly are you trying to execute and what is the exact error?
Still how does composer find my json file in symfony2 ?
It's ok for th execution , sorry , but the json file is in a different directory , how can I specify it when running the command update for composer ?
You have to run composer install from a dir that contains a composer.json file. If there is no composer.json it wont do anything.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.