Created
April 15, 2014 05:58
-
-
Save mathewka/10705846 to your computer and use it in GitHub Desktop.
Installation of composer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Installation of composer | |
| refer the URL (http://getcomposer.org/doc/00-intro.md) | |
| Installation - Windows# | |
| Using the Installer# | |
| This is the easiest way to get Composer set up on your machine. | |
| Download and run Composer-Setup.exe, it will install the latest Composer version and set up your PATH so that you can just call composer from any directory in your command line. | |
| Manual Installation# | |
| Change to a directory on your PATH and run the install snippet to download composer.phar: | |
| C:\Users\username>cd C:\bin | |
| C:\bin>php -r "eval('?>'.file_get_contents('https://getcomposer.org/installer'));" | |
| Note: If the above fails due to file_get_contents, use the http url or enable php_openssl.dll in php.ini | |
| Create a new composer.bat file alongside composer.phar: | |
| C:\bin>echo @php "%~dp0composer.phar" %*>composer.bat | |
| Close your current terminal. Test usage with a new terminal: | |
| C:\Users\username>composer -V | |
| Composer version 27d8904 | |
| C:\Users\username> | |
| Using Composer# | |
| We will now use Composer to install the dependencies of the project. If you don't have a composer.json file in the current directory please skip to the Basic Usage chapter. | |
| To resolve and download dependencies, run the install command: | |
| $ php composer.phar install | |
| If you did a global install and do not have the phar in that directory run this instead: | |
| $ composer install | |
| Following the example above, this will download monolog into the vendor/monolog/monolog directory. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment