dev-master
9999999-devProxy for Composer repositories
MIT
The Requires
- php >=5.3.2
- composer/composer 1.0.*@alpha
repository composer proxy
Wallogit.com
2017 © Pedro Peláez
Proxy for Composer repositories
This project is not maintained anymore. Btw, do you know that Composer dist packages are automatically cached?, (*1)
Stone is a repository proxy for Composer. It will create a local repository with all the packages you want to mirror. Then you can use the global configuration of Composer to fetch the packages from this local repository instead of Packagist., (*2)
Download the source:, (*3)
git clone git://github.com/mattketmo/stone.git
Ensure that you can compile PHAR files in php.ini:, (*4)
[Phar] ; http://php.net/phar.readonly phar.readonly = Off
Compile it to a PHAR file:, (*5)
./bin/compile
Now its recommended to chmod +x stone.phar and make it available into your
$PATH to use it everywhere you need., (*6)
You can automatically initialize the local repository with the init
command:, (*7)
stone.phar init
Or you can do it manually by editing the global Composer configuration
(~/.composer/config.json on Unix system):, (*8)
{
"repositories": [
{
"type": "composer",
"url": "file:///<HOME>/.composer/stone"
}
]
}
and creating an empty ~/.composer/stone/packages.json:, (*9)
{
"packages": { }
}
To mirror any package from a composer.json file just run:, (*10)
stone.phar mirror /path/to/composer.json
Be sure to regulary update your local packages by running:, (*11)
stone.phar update
That's it! Composer will now use all your mirrored packages instead of fetching them from Packagist., (*12)
Branch alias are not recognized by composer (eg. "doctrine/common": "2.3.x-dev" will fetch from GitHub instead of the local repository), (*13)
Packages replacement have strange behaviour. For instance, if you've mirror "symfony/symfony", then requiring "symfony/console" will fetch "symfony/symfony" (and all its dependencies) instead of just the "subtree", (*14)
For now, it's totally indifferent to the dependences between packages, so it
will only download the requires of your composer. You can have
a dummy.json file inside your ~/.composer folder and put all the packages
you want to mirror, (*15)
Proxy for Composer repositories
MIT
repository composer proxy