applecrusher
applecrusher

Reputation: 5648

Update composer dependencies from command line

I am currently working with symfony2 and I want to launch to download the libraries I need. I know the command in linux is "$ ./composer.phar update --dev" however when I run this in windows it prompts whether I should open the file with the windows explorer or not. I currently have composer.phar installed on windows but I am having trouble launching it. How would I be able to update my symfony2 folder with the dependencies I need. Thank you.

Upvotes: 20

Views: 79372

Answers (5)

Akbarali
Akbarali

Reputation: 904

This worked for me on my Centos server

sudo -u nginx php composer.phar update

Upvotes: 0

Farbod
Farbod

Reputation: 191

  1. Go to C:\ProgramData\ComposerSetup\bin\composer.phar
  2. In CMD write php composer.phar (update) or (self-update)

Upvotes: 6

Pankaj Kumar
Pankaj Kumar

Reputation: 129

1: Open cmd

  1. First go to your work directory like if you have wamp then c:/wamp/www.

  2. Then enter composer if you can see list of composer command then its good.

  3. Now type "composer self-update".

5: Next you can see the process.

Upvotes: 5

jfraber
jfraber

Reputation: 615

In CMD:

php C:\ProgramData\ComposerSetup\bin\composer.phar self-update

Upvotes: 44

kormik
kormik

Reputation: 869

The problem is that Windows don't know how to open .phar files. You need to execute them using php interpreter php composer.phar update and the php interpreter(php.exe) must be accessible on PATH.

You could use command php -v to check if your php is accessible from command line.

Upvotes: 20

Related Questions