Created
September 25, 2014 19:12
-
-
Save ulrikkold/6893632472eb07a8b15b to your computer and use it in GitHub Desktop.
Using composer.json with private repositories (without using Packagist)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is mostly a note to my own bad memory. I hope somebody else can use it, too. | |
When using composer to manage packages, and one or more of these packages (including the root project itself) is not registered on Packagist, then you must include an entry in the "repositories" array in your composer.json. | |
I am pretty sure this must be noted somewhere in the documentation, but I was not able to find it. | |
Example: | |
{ | |
"name": "vendor/PackageA", | |
"require": "vendor/PackageB", | |
"repositories": [ | |
{ | |
"type": "vcs", | |
"url": "git@github.com:vendor/PackageA.git" | |
}, | |
{ | |
"type": "vcs", | |
"url": "git@github.com:vendor/PackageB.git" | |
} | |
] | |
} | |
I was hinted in this direction by this SO question: https://stackoverflow.com/questions/22536978/how-to-solve-the-package-not-available-in-stable-enough-version-error-of-compo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Clean up: