Composer and Packagist
Composer is a brilliant dependency manager for PHP. List your project’s dependencies in acomposer.json
file and, with a few simple commands, Composer will automatically
download your project’s dependencies and setup autoloading for you.There are already a lot of PHP libraries that are compatible with Composer, ready to be used in your project. These “packages” are listed on Packagist, the official repository for Composer-compatible PHP libraries.
How to Install Composer
You can install Composer locally (in your current working directory; though this is no longer recommended) or globally (e.g. /usr/local/bin). Let’s assume you want to install Composer locally. From your project’s root directory:curl -s https://getcomposer.org/installer | php
This will download composer.phar
(a PHP binary archive). You can run this with php
to manage your project dependencies. Please Note: If you pipe downloaded code directly into an interpreter, please read the code online first to confirm it is safe.Install Elastica Using Composer
|
0 comments:
Post a Comment