2017 © Pedro Peláez
 

library stone

Proxy for Composer repositories

image

mattketmo/stone

Proxy for Composer repositories

  • Friday, September 13, 2013
  • by MattKetmo
  • Repository
  • 2 Watchers
  • 10 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 2 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Stone - Proxy for Composer

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)

Installation

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": { }
}

Usage

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)

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), (*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)

The Versions

13/09 2013

dev-master

9999999-dev

Proxy for Composer repositories

  Sources   Download

MIT

The Requires

 

repository composer proxy