我正在尝试在Symfony 2.1中使用composer从
github库中删除供应商,这些库不是作曲家意识的,可能永远不会.
举些例子:
Old Deps文件:
[jQuery] git=git://github.com/jquery/jquery.git version=1.8.1 [Mocha] git=https://github.com/visionmedia/mocha.git
作曲家(不起作用)
"repositories": [ { "type": "package","package": { "name": "jquery","version": "1.8.1","dist": { "url": "git://github.com/jquery/jquery.git","type": "git" } } } ],"require": { "jquery": "1.8.1" }
解决方法
如果从git下载,则需要指定“源”包,而不是“dist”包.使用:
"repositories": [ { "type": "package","source": { "url": "git://github.com/jquery/jquery.git","type": "git","reference": "1.8.1" } } } ],"require": { "jquery": "1.8.1" }