Composer, a package manager for PHP

Composer is probably a bad name for a package manager in the sense where it is hard to research online by searching on the keyword ‘composer’ without receiving Beethoven as part of results. The composer I am referring to is this. Composer is a package manager tracking local dependencies of your projects and libraries.

Composer lets you specify your dependencies in a composer.json file looks like this:

{
    "require": {
        "doctrine/common": "2.1.*",
        "monolog/monolog": ">=1.0,<1.2-dev",
        "swiftmailer/swiftmailer": ">=4.1.2,<4.2-dev",
        "twig/twig": ">=1.1,<2.0-dev"
    }
}

This file will install the components into the a vendor folder on the directory where you execute the following:

php composer.phar install

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>