5

バンドル内でバンドルを使用しようとしていますが、どういうわけか失敗しています。

"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 update私が得るすべては私がラム酒を飲むときです

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

4

2 に答える 2

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ファイル内)

于 2012-09-14T13:15:55.497 に答える