gremo gremo - 2 years ago 65
PHP Question

Is there any way to install Composer globally on Windows?

I've read the global installation documentation for Composer, but it's for *nix systems only:

curl -s | php
sudo mv composer.phar /usr/local/bin/composer

I would be such happy doing the same on Windows, that's the OS of my development machine. I would be able to run

composer update

From an arbitrary folder where
exists. Interpreter
is already in

Any clue?

Answer Source

Sure. Just put composer.phar somewhere like C:\php\composer.phar, then make a batch file somewhere within the PATH called composer.bat which does the following:

php "%~dp0composer.phar" %*

The "%*" repeats all of the arguments passed to the shell script.

Then you can run around doing composer update all ya want!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download