Issue
PHP Composer allows you to define it project's composer.json list of urls pointing to private repositories. Example:
{
"require": {
"vendor/my-private-repo": "dev-master"
},
"repositories": [
{
"type": "vcs",
"url": "git@bitbucket.org:vendor/my-private-repo.git"
}
]
}
But whenever I create a new private repo I need to edit all my projects and add that new repo URL to their composer.json before I am able to request that new package.
Is there any global composer configuration where I could store URLs to all of my private repos or even better where I can globally set an URL pointing to a resource that will have a list of all my private repos and their URLs up to date?
Solution
You could set all repositories in you Composer home directory (find where it is with composer config --global home
). There is a config.json
file in which you can add all the global repositories (global on that machine for all your projects).
See the docs on this file: https://getcomposer.org/doc/03-cli.md#composer-home-config-json
Unfortunately, you cannot have a central managed way for this out of the box. You could look into Composer Satis for this. With Satis you can host a single repository that references where all your packages are located (e.g. Bitbucket, GitHub or otherwise).
Answered By - 7ochem
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.