如何在Bundle中正确声明对另一个Bundle的依赖?

Sen*_*nči 5 symfony composer-php symfony-2.1

我试图在Bundle中使用Bundle但不知何故它是failig.

"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/myname/mybundle"
    }
],
"require": {
    "php": ">=5.3.3",
    "symfony/symfony": "2.1.*",
    (...)
    "myname/mybundle": "*"
},
Run Code Online (Sandbox Code Playgroud)

这似乎到目前为止工作.但我无法弄清楚如何在"myname/mybundle"中声明另一个依赖项.

我在myname/mybundle的composer.json文件中尝试了以下内容,但没有一个工作:(

"repositories": [
    {
        "type": "vcs",
        "url": "url": "https://github.com/drymek/PheanstalkBundle"
    }
],
"require": {
    (...)
    "drymek/PheanstalkBundle": "dev-master"
}
Run Code Online (Sandbox Code Playgroud)

"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"
}
Run Code Online (Sandbox Code Playgroud)

当我朗姆酒composer.phar update得到的全部是

- myname/mybundle dev-master requires drymek/pheanstalkbundle dev-master -> no matching package found.

Sen*_*nči 5

好的,我在这里找到了答案

它声明:Repositories are not resolved recursively. You can only add them to your main composer.json. Repository declarations of dependencies' composer.jsons are ignored.

那太糟糕了......但现在至少我知道在哪里放置我的依赖(在根composer.json文件中)