比如说你想使用别人的一个软件包,但是想对其进行一些修改。那么你可以在一个新分支上进行修改,并像下面这样配置composer.json:
{
"require": {
"sylius/assortment-bundle": "dev-soft-deleteable-products-disabled"
},
"repositories": [
{
"type": "package",
"package": {
"name": "sylius/assortment-bundle",
"version": "1.0",
"autoload": { "psr-0": { "Sylius\\Bundle\\AssortmentBundle": "" } },
"target-dir": "Sylius/Bundle/AssortmentBundle",
"source": {
"url": "https://github.com/umpirsky/SyliusAssortmentBundle.git",
"type": "git",
"reference": "soft-deleteable-products-disabled"
}
}
}
]
}
这在主分支上有效,但在自定义分支上会显示:The requested package sylius/assortment-bundle dev-soft-deleteable-products-disabled could not be found.
有什么想法吗?