2016-11-20 49 views
0

enter image description here如何獲取叉子鏈庫與作曲家

作曲家更新不會讓我分出的代碼庫。

我的項目composer.json

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

我叉回購1 composer.json

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

你會得到什麼錯誤? – Dekker

+0

我沒有得到任何錯誤,只是拉原來的repository.I不得分叉回購 – ErcanE

回答

0

我應該DEV-主使用

"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" 
}], 

或 某些情況

"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" 
}], 
0

把回購而你只需要在主composer.json叉並明確要求鏈接依賴項。

我的項目composer.json

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

然後運行:

composer update github/repo-1 github/repo-2 
+0

謝謝這幫助我找到正確的解決方案 – ErcanE