使用composer安装SyliusCartBundle时出错

时间:2015-02-03 12:36:17

标签: symfony composer-php sylius

我想使用composer在我的Symfony2应用程序中安装SyliusCartBundle,请帮我节省一天。

在与Bundle关联的composer.json中需要:

    "php": ">=5.3.3",
    "symfony/framework-bundle": "~2.3",
    "sylius/order-bundle":      "0.12.*@dev",
    "sylius/money-bundle":      "0.12.*@dev",
    "sylius/resource-bundle":   "0.12.*@dev",
    "sylius/cart":              "0.12.*@dev"

这是我用来安装捆绑包的命令行

composer require "sylius/cart-bundle:0.12.0"

但是我收到了这个错误:

enter image description here

这是我的composer.json:

{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
    "psr-0": { "": "src/" }
},
"require": {
    "php": ">=5.3.3",
    "symfony/symfony": "2.3.*",
    "doctrine/orm": "~2.2,>=2.2.3",
    "doctrine/doctrine-bundle": "1.2.*",
    "twig/extensions": "1.0.*",
    "symfony/assetic-bundle": "2.3.*",
    "symfony/swiftmailer-bundle": "2.3.*",
    "symfony/monolog-bundle": "2.3.*",
    "sensio/distribution-bundle": "2.3.*",
    "sensio/framework-extra-bundle": "2.3.*",
    "sensio/generator-bundle": "2.3.*",
    "incenteev/composer-parameter-handler": "~2.0"
},
"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"
    ],
    "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"
    ]
},
"config": {
    "bin-dir": "bin"
},
"minimum-stability": "stable",
"extra": {
    "symfony-app-dir": "app",
    "symfony-web-dir": "web",
    "incenteev-parameters": {
        "file": "app/config/parameters.yml"
    },
    "branch-alias": {
        "dev-master": "2.3-dev"
    }
}

}

1 个答案:

答案 0 :(得分:0)

您需要重写您的composer json文件以满足SyliusCartBundle(带有版本~1.3的doctrine-bundle)的要求:

"require": {
    ...
    "doctrine/doctrine-bundle": "~1.3",
    ...
},