What is "commiserate"

The Composer is a dependency manager for PHP. Based on a list of libraries and their versions, it installs these dependencies in your project. Note that the installation/copy is made to your project, not for your system. That’s why it’s considered only a dependency manager, not a package manager.

Why use Poser? Example with Laravel 4

To start a development you do not need to download the entire Laravel 4 with all libs (libraries). Just download the default file structure and start its development; when it is necessary to interpret/compile the code to see the result then you download the Laravel libs using Composer, because they are necessary for interpreting/compiling the code. To do this all Composer uses a json file in which it checks which libs should be installed or updated.

Links Úteis

  • Documentation: The main source of documentation for the project.

  • Packagist: It is the main repository of Composer. It aggregates all types of PHP packages that are installable with Composer.

  • The Source code is available on Github and distributed under the MIT license.

  • Composer as a service: Copy / paste the composer.json and get the vendor.zip file from your dependencies. Also, you can check the log of your build. It may be useful to debug.

  • Packanalyst: Packanalyst is a service that allows you to browse Packagist packages and shows who is using and implementing their interfaces / abstract classes / strokes.

Installation

We can see the Composer.phar or Composer.php in the root folder of many frameworks. If you don’t have Composer, the official documentation includes installation instructions (in English) for *Nix and Windows.

With Composer installed

To install the dependencies:

php Composer.php install

To update the Composer itself:

php Composer.php self-update

If there are updates to your framework and you would like to update it (Remembering that you need to have it installed first):

php Composer.php update

References