我试图在Bundle中使用Bundle但不知何故它是failig. "repositories": [ { "type": "vcs", "url": "https://github.com/myname/mybundle" }],"require": { "php": "=5.3.3", "symfony/symfony": "2.1.*", (...) "myname/mybundle": "*"}, 这似乎
"repositories": [
{
"type": "vcs",
"url": "https://github.com/myname/mybundle"
}
],
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.1.*",
(...)
"myname/mybundle": "*"
},
这似乎到目前为止工作.但我无法弄清楚如何在“myname / mybundle”中声明另一个依赖项.
我在myname / mybundle的composer.json文件中尝试了以下内容,但没有一个工作:(
"repositories": [
{
"type": "vcs",
"url": "url": "https://github.com/drymek/PheanstalkBundle"
}
],
"require": {
(...)
"drymek/PheanstalkBundle": "dev-master"
}
和
"repositories": [
{
"type": "package",
"package": {
"name": "drymek/PheanstalkBundle",
"version": "dev-master",
"source": {
"url": "https://github.com/drymek/PheanstalkBundle.git",
"type": "git",
"reference": "master"
}
}
}
],
"require": {
(...)
"drymek/PheanstalkBundle": "dev-master"
}
当我朗读composer.phar更新我得到的全部是
– myname / mybundle dev-master需要drymek / pheanstalkbundle dev-master – >找不到匹配的包.
好的,我找到了答案 here它指出:存储库不会递归解析.您只能将它们添加到主composer.json中.依赖项’composer.jsons的存储库声明被忽略.
那太糟糕了……但现在至少我知道在哪里放置我的依赖(在根composer.json文件中)
