[Deprecated] Simple repository proxy for Composer
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Stone - Proxy for Composer

This project is not maintained anymore. Btw, do you know that Composer dist packages are automatically cached?

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.


Download the source:

git clone git://github.com/mattketmo/stone.git

Ensure that you can compile PHAR files in php.ini:

; http://php.net/phar.readonly
phar.readonly = Off

Compile it to a PHAR file:


Now its recommended to chmod +x stone.phar and make it available into your $PATH to use it everywhere you need.

You can automatically initialize the local repository with the init command:

stone.phar init

Or you can do it manually by editing the global Composer configuration (~/.composer/config.json on Unix system):

    "repositories": [
            "type": "composer",
            "url": "file:///<HOME>/.composer/stone"

and creating an empty ~/.composer/stone/packages.json:

    "packages": { }


To mirror any package from a composer.json file just run:

stone.phar mirror /path/to/composer.json

Be sure to regulary update your local packages by running:

stone.phar update

That's it! Composer will now use all your mirrored packages instead of fetching them from Packagist.

Known issues

  • Branch alias are not recognized by composer (eg. "doctrine/common": "2.3.x-dev" will fetch from GitHub instead of the local repository)

  • 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"

  • 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