8. [kawahara@udon ~ master] $ composer update --
dev
Updating dependencies (including require-dev)
......
Your requirements could not be resolved to an
installable set of packages.
10:05 a.m.
9. Mecanisum of Composer
1. Gets /packagis.json from repository
○ Ok. It's very fast. Only 1KB.
2. Gets providers information from repository
○ Gets 4 files.
3. Gets package information
○ In case of Symfony Standard
○ 72 files, 7.7MB
○ (If there is file cache in local,
composer fetch data from here.)
4. Resolve Dependencies
5. Gets Package (Archive or Source)
10. Some ways to resolve it
● Use private repository
○ satis (composer/satis を活用してComposer パッ
ケージの配布を行う http://www.bucyou.net/blog/952)
○ Broker (https://github.com/researchgate/broker)
● Satis is good solution, but we need install
required package in advance.
● Make mirror in Japan.
13. How to use?
● Edit your composer global configuration.
(default $HOME/.composer/config.json)
{
"repositories": [
{ "packagist": false },
{
"type": "composer",
"url": "http://composer-proxy.jp/proxy/packagist"
}
]
}
14. Speed
● resolve dependencies of symfony/console
● direct to packagist.org
○ 120.24 secouns
● composer-proxy.jp (cached)
○ 41.35 seconds
● 3x faster!!!
● Need more cache information in Japan!!
Please use!!
15. In furture
● Support notice (for download count) by
asyncronous message queue.
● Support search
● Distribution archive cache
● Add own packages