Sylius Fresh安装:无法安装" sensio / generator-bundle"?

时间:2015-02-07 09:46:38

标签: php symfony bundle composer-php sylius

我是Sylius的新手,我刚刚在我的Mac上安装了一个新的Sylius项目,它工作正常。然后我意识到我需要在src下创建自己的bundle来覆盖Sylius包。通常,我会使用" php app / console generate:bundle"生成一个束骨架,但是" sensio / generator-bundle"没有与默认的Sylius项目集成,所以我需要先通过composer安装它,但由于依赖性错误,我似乎无法做到这一点,下面是错误结果

Problem 1

- Conclusion: don't install sensio/generator-bundle v2.5.1
- Installation request for sensio/generator-bundle ~2.5 -> satisfiable by sensio/generator-bundle[v2.5.0, v2.5.1].
- Conclusion: remove symfony/symfony v2.3.25
- sensio/generator-bundle v2.5.0 requires symfony/console ~2.5 -> satisfiable by symfony/symfony[v2.5.0, v2.5.1, v2.5.10, v2.5.2, v2.5.3, v2.5.4, v2.5.5, v2.5.6, v2.5.7, v2.5.8, v2.5.9, v2.6.0, v2.6.1, v2.6.2, v2.6.3, v2.6.4], symfony/console[v2.5.0, v2.5.1, v2.5.10, v2.5.2, v2.5.3, v2.5.4, v2.5.5, v2.5.6, v2.5.7, v2.5.8, v2.5.9, v2.6.0, v2.6.1, v2.6.2, v2.6.3, v2.6.4].
- don't install symfony/console v2.5.0|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.5.1|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.5.10|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.5.2|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.5.3|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.5.4|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.5.5|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.5.6|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.5.7|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.5.8|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.5.9|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.6.0|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.6.1|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.6.2|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.6.3|don't install symfony/symfony v2.3.25
- don't install symfony/console v2.6.4|don't install symfony/symfony v2.3.25
- Can only install one of: symfony/symfony[v2.5.0, v2.3.25].
- Can only install one of: symfony/symfony[v2.5.1, v2.3.25].
- Can only install one of: symfony/symfony[v2.5.10, v2.3.25].
- Can only install one of: symfony/symfony[v2.5.2, v2.3.25].
- Can only install one of: symfony/symfony[v2.5.3, v2.3.25].
- Can only install one of: symfony/symfony[v2.5.4, v2.3.25].
- Can only install one of: symfony/symfony[v2.5.5, v2.3.25].
- Can only install one of: symfony/symfony[v2.5.6, v2.3.25].
- Can only install one of: symfony/symfony[v2.5.7, v2.3.25].
- Can only install one of: symfony/symfony[v2.5.8, v2.3.25].
- Can only install one of: symfony/symfony[v2.5.9, v2.3.25].
- Can only install one of: symfony/symfony[v2.6.0, v2.3.25].
- Can only install one of: symfony/symfony[v2.6.1, v2.3.25].
- Can only install one of: symfony/symfony[v2.6.2, v2.3.25].
- Can only install one of: symfony/symfony[v2.6.3, v2.3.25].
- Can only install one of: symfony/symfony[v2.6.4, v2.3.25].
- Installation request for symfony/symfony == 2.3.25.0 -> satisfiable by symfony/symfony[v2.3.25].

下面是我的composer.json(全新安装)

{
"name":        "sylius/sylius-standard",
"description": "Sylius SE, modern e-commerce solution for Symfony2",
"keywords":    ["symfony", "symfony2", "sylius", "distribution", "ecommerce", "cart"],
"type":        "project",
"license":     "MIT",
"homepage":    "http://sylius.org",
"authors": [
    {
        "name":     "Paweł Jędrzejewski",
        "homepage": "http://pjedrzejewski.com"
    },
    {
        "name":     "Sylius project",
        "homepage": "http://sylius.org"
    },
    {
        "name":     "Community contributions",
        "homepage": "http://github.com/Sylius/Sylius/contributors"
    }
],
"require": {
    "php":                                  ">=5.3.3",
    "sylius/sylius":                        "0.12.*@dev",

    "doctrine/doctrine-bundle":             "@dev",
    "doctrine/migrations":                  "@dev",
    "doctrine/doctrine-migrations-bundle":  "@dev",
    "friendsofsymfony/user-bundle":         "@dev",
    "knplabs/knp-gaufrette-bundle":         "@dev",
    "knplabs/knp-snappy-bundle":            "@dev",
    "liip/doctrine-cache-bundle":           "@dev",
    "mathiasverraes/money":                 "@dev",
    "pagerfanta/pagerfanta":                "@dev",
    "white-october/pagerfanta-bundle":      "@dev",
    "friendsofsymfony/oauth-server-bundle": "@dev",
    "willdurand/hateoas-bundle":            "1.0.*@dev",
    "jms/serializer-bundle":                "0.13.*@dev",
    "friendsofsymfony/rest-bundle":         "~1.5@dev"
},
"require-dev": {
    "behat/behat":                       "~3.0",
    "behat/symfony2-extension":          "~2.0@dev",
    "behat/mink-extension":              "~2.0@dev",
    "behat/mink-browserkit-driver":      "~1.2@dev",
    "behat/mink-selenium2-driver":       "@dev",
    "behat/mink":                        "~1.6@dev",
    "doctrine/doctrine-fixtures-bundle": "2.2.*",
    "fzaninotto/faker":                  "~1.2",
    "phpspec/phpspec":                   "~2.0",
    "phpunit/phpunit":                   "~3.7"
},
"scripts": {
    "post-install-cmd": [
        "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
        "Symfony\\Cmf\\Bundle\\CreateBundle\\Composer\\ScriptHandler::downloadCreate"
    ],
    "post-update-cmd": [
        "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
        "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
        "Symfony\\Cmf\\Bundle\\CreateBundle\\Composer\\ScriptHandler::downloadCreate"
    ]
},
"autoload": {
    "psr-0": {
        "": "src/",
        "Context": "features/"
    }
},
"config": {
    "bin-dir": "bin"
},
"extra": {
    "symfony-app-dir": "app",
    "symfony-web-dir": "web",
    "incenteev-parameters": {
        "file": "app/config/parameters.yml"
    }
}
}

是否可以安装生成器捆绑包或是否有另一种方法来创建捆绑包?

谢谢

1 个答案:

答案 0 :(得分:2)

这是错误消息中的重要一行: sensio / generator-bundle v2.5.0需要symfony / console~2.5 后跟结论:删除symfony / symfony v2.3.25

这意味着:(a)您安装了Symfoy 2.3.25并且(b)您想要一个至少需要Symfony 2.5的SensioGeneratorBundle版本。

您可以通过两种方式解决它:

  • 将Symfony版本约束压缩到~2.5
  • 需要与Symfony 2.3兼容的SensioGeneratorBundle版本。