Php - Composer

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

Management

Get

cd /myProjectRoot
composer require namespace/module

Basic php file

require_once './vendor/autoload.php';

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

Documentation / Reference


Powered by ComboStrap