Table of Contents

About

package manager for php.

It manages package

  • on a per-project basis,
  • installing them in a directory (e.g. vendor) inside your project. By default it does not install anything globally. It does however support a “global” project for convenience via the global command.

Composer is strongly inspired by node's npm and ruby's bundler.

composer.json

https://getcomposer.org/doc/04-schema.md

Management

Run

composer xxx

# or

php composer.phar xxx

Get / Require a package

cd /myProjectRoot
composer require namespace/module

Basic php file

require_once './vendor/autoload.php';

use Module\Class\Path\Hello
echo Hello.get();

where composer autoload uses the autoload feature.

Documentation / Reference