February 7, 2015

Installing PHP Composer globally on Windows

Composer is a dependency manager for PHP. PEAR used to be the go-to tool for managing PHP dependencies quite some time ago, but it was always cumbersome, and not much fun to use. Composer makes it very easy!

On Windows, you can use the .exe installer; note you will need PHP installed, and have the php.exe accessible. In this particular case, I will be using Cygwin shell, and have already installed PHP as a Cygwin package for it:


When installation is done, close and reopen your terminal:


You can now run the composer command from anywhere in your shell.

composer
   ______
  / ____/___  ____ ___  ____  ____  ________  _____
 / /   / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__  )  __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
                    /_/
Composer version 1.0-dev

No comments :

Post a Comment