Composer
|
vs |
PEAR
|
$ curl -sS https://getcomposer.org/installer | php
$ curl -sS https://getcomposer.org/installer | php -- --install-dir=bin
$ ln -s /usr/bin/composer.phar /usr/bin/composer
$ composer self-update
Updating to version ae3b7ad5c07d1df35cf4c2d. Downloading: 100%
$ cd <your-project>
$ composer init
[...] Follow step-by-step guide
$ cat composer.json
$ composer install
{
"name": "imbo/imboclient",
"require": {
"php": ">=5.3.2",
"guzzle/guzzle": "~3.7.4"
},
"require-dev": {
"phpunit/phpunit": "3.7.*"
},
"autoload": {
"psr-0": {
"ImboClient": "library"
}
},
"description": "PHP client for the Imbo-project",
"keywords": ["image storage", "image transformation"],
"license": "MIT",
"authors": [{
"name": "Christer Edvartsen"
}],
"support": {
"issues": "https://github.com/imbo/imboclient-php/issues",
"irc": "irc://irc.freenode.net/imbo"
}
}
<?php require BASE_PATH . '/vendor/autoload.php'; use ImboClient\Client as ImboClient, Silex\Application;
$imbo = new ImboClient(); $app = new Application();
"repositories": [
{
"type": "composer",
"url": "http://private.satis.example.org"
},
{
"type": "vcs",
"url": "git://example.org/MyRepo.git"
},
{
"packagist": false
}
]
$ composer create-project imbo/imbo