How to use Composer
Install Composer Globally
Composer requires PHP 5.3.2+ to run. A few sensitive php settings and compile flags are also required, but the installer will warn you about any incompatibilities.
To install packages from sources instead of simple zip archives, you will need git, svn or hg depending on how the package is version-controlled.
You can run these commands to easily access composer from anywhere on your system:
Defining dependencies
Packagist is the main Composer repository. It aggregates all sorts of PHP packages that are installable with Composer. To install Mustache create the file composer.json:
and run the command:
To use this package in our project create a file test.php with the content:
To update a Composer package run: