Composer versioning private repositories

composer-php, git, versioning

Solution

You can use satis : https://getcomposer.org/doc/articles/handling-private-packages-with-satis.md

It will crawl your repositories and build a list of available versions for your projects.

Problem

I have several private repos on github that I use composer to load into my projects. My composer.json file looks like this: ``` ... "repositories": [ { "type": "git", "url": "git@github.com:me/my-repo.git" } ], "require": { "me/my-repo": "*" } ... ``` How do I configure my composer.json in "me/my-repo" file so I can request certain versions of the repo? For example, I'd like to be able to use "me/my-repo": "1.0.x" in some projects and "me/my-repo": "1.5.x-dev" in another project. I've looked all around but have not been able to find a way to do this.

Original source