Répétez pour chacune des dépendances :
$ curl -sS https://getcomposer.org/installer | php
{
"require": {
"pimple/pimple": "1.*",
"symfony/event-dispatcher": "2.1.*",
"kunststube/router": "dev-master",
"symfony/yaml": "2.1.*",
"twig/twig": "1.*",
"jms/serializer": ">=0.8.0,<=0.11.0"
},
"autoload": {
"psr-0": {
"": "src/"
}
}
}
% php composer.phar install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
- Installing pimple/pimple (v1.0.2)
Downloading: 100%
- Installing twig/twig (v1.12.2)
Downloading: 100%
- Installing symfony/yaml (v2.1.8)
Downloading: 100%
[...]
Generating autoload files
.
├── [...]
├── composer.json
├── composer.lock
└── vendor
├── autoload.php
├── [...]
├── kunststube
│ └── router
├── pimple
│ └── pimple
├── symfony
│ ├── event-dispatcher
│ └── yaml
└── twig
└── twig
require 'vendor/autoload.php';
Dans un bootstrap de tests :
$loader = require 'vendor/autoload.php';
$loader->add('Acme\\Test\\', __DIR__);
php composer.phar --prefer-dist --optimize-autoloader
pour les déploiements