ErcanE ErcanE - 12 days ago 5
Git Question

How To Get Fork on Chain Repositories With Composer

enter image description here

composer update doesn't get my forked repository.

my project composer.json

"require": {
"github/repo-1": "^0.3.8",
},
"repositories": [{
"type": "vcs",
"url": "https://github.com/personal/repo-1"
},
],


my forked repo-1 composer.json

"require": {
"github/repo-2": "^0.1",
},
"repositories": [{
"type": "vcs",
"url": "https://github.com/personal/repo-2"
}],

Answer

I should use as dev-master

"require": {
  "github/repo-1": "dev-master",
  "github/repo-2": "dev-master",
},
"repositories": [{
    "type": "vcs",
    "url": "https://github.com/personal/repo-1"
},
{
     "type": "vcs",
     "url": "https://github.com/personal/repo-2"
}],

OR some situation

"require": {
  "github/repo-1": "dev-master as v1.1.x-dev",
  "github/repo-2": "dev-master as v2.1.x-dev",
},
"repositories": [{
    "type": "vcs",
    "url": "https://github.com/personal/repo-1"
},
{
     "type": "vcs",
     "url": "https://github.com/personal/repo-2"
}],
Comments