orourkedd
orourkedd

Reputation: 6421

Composer versioning private repositories

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":  "[email protected]: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.

Upvotes: 4

Views: 5358

Answers (2)

Michael
Michael

Reputation: 1139

If you want to avoid configuring Composer with Git or setting up your own Satis, you can try a cloud alternative. I work for Gemfury and we will soon be introducing Composer support to our private cloud repo. If you'd like to try it out early, here's a guide on how to get started: http://devcenter.gemfury.com/articles/php-composer-server.html

Upvotes: 0

greg0ire
greg0ire

Reputation: 23255

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.

Upvotes: 2

Related Questions