在symfony2项目中,我正在使用" jms / serializer-bundle"我的一个依赖项有一个问题,即jms/metadata
库。我已经分叉了元数据库并在bugfix-doctrine-proxy
分支中包含了一个修复程序。
现在我想知道如何告诉作曲家,在需要依赖时它应该使用我的分支吗?
序列化程序库的composer.json:
{
"name": "jms/serializer",
"type": "library",
...
],
"require": {
"php": ">=5.3.2",
"jms/metadata": "~1.1",
"jms/parser-lib": "1.*",
"phpcollection/phpcollection": "~0.1",
"doctrine/annotations": "1.*"
},
...
}
我的symfony2-project composer.json:
{
...
"repositories": [
{
"type": "git",
"url": "git@github.com:hauptsacheNet/metadata.git"
}
],
"require": {
"jms/serializer-bundle": "dev-master",
...
}
}
答案 0 :(得分:5)
答案是使用分支别名:
{
"repositories": [
{
"type": "git",
"url": "git@github.com:hauptsacheNet/metadata.git"
}
],
"require": {
"jms/metadata": "dev-bugfix-doctrine-proxy-class as 1.1",
},
}