friendsofsymfony / rest-bundle 2.1.0与sensio / framework-extra-bundle冲突[v2.2.6]

时间:2016-10-26 19:39:15

标签: web-services symfony composer-php

您好我的应用程序正在运行Symfony 2.2,我正在尝试使用commannde composer require friendsofsymfony/rest-bundle安装FOSRESTBundle,但是我收到了以下错误。

Your requirements could not be resolved to an installable set of packages. Problem 1
- friendsofsymfony/rest-bundle 2.1.0 conflicts with sensio/framework-extra-bundle[v2.2.6].
- friendsofsymfony/rest-bundle 2.1.0 conflicts with sensio/framework-extra-bundle[v2.2.6].
- friendsofsymfony/rest-bundle 2.1.0 conflicts with sensio/framework-extra-bundle[v2.2.6].
- Installation request for friendsofsymfony/rest-bundle ^2.1 -> satisfiable by friendsofsymfony/rest-bundle[2.1.0].
- Installation request for sensio/framework-extra-bundle (locked at v2.2.6, required as 2.2.*) -> satisfiable by sensio/framework-extra-bundle[v2.2.6].Installation failed, reverting ./composer.json to its original content.

composer.json的内容在这里

{
    "name": "symfony/framework-standard-edition",
    "description": "The \"Symfony Standard Edition\" distribution",
    "autoload": {
        "psr-0": { "": "src/" }
    },
    "require": {
        "php": ">=5.3.3",
        "symfony/symfony": "2.2.*",
        "doctrine/orm": "~2.2,>=2.2.3",
        "doctrine/doctrine-bundle": "1.2.*",
        "twig/extensions": "1.0.*",
        "symfony/assetic-bundle": "2.1.*",
        "symfony/swiftmailer-bundle": "2.2.*",
        "symfony/monolog-bundle": "2.2.*",
        "sensio/distribution-bundle": "2.2.*",
        "sensio/framework-extra-bundle": "2.2.*",
        "sensio/generator-bundle": "2.2.*",
        "jms/security-extra-bundle": "1.4.*",
        "jms/di-extra-bundle": "1.3.*",
        "winzou/console-bundle": "1.*",
        "stof/doctrine-extensions-bundle": "1.1.x-dev",
        "doctrine/doctrine-fixtures-bundle": "dev-master",
        "doctrine/data-fixtures" : "dev-master",
        "doctrine/doctrine-migrations-bundle": "dev-master",
        "doctrine/migrations": "dev-master",
        "friendsofsymfony/user-bundle": "*",
        "knplabs/knp-markdown-bundle": "1.2.*@dev",
        "ornicar/akismet-bundle": "dev-master",
        "genemu/form-bundle": "2.1.*",
        "spraed/pdf-generator-bundle": "^1.2",
        "psliwa/pdf-bundle": "^1.0",
        "knplabs/knp-snappy-bundle": "^1.3",
        "h4cc/wkhtmltopdf-i386": "0.12.2.1",
        "h4cc/wkhtmltoimage-i386": "0.12.2.1",
        "obtao/html2pdf-bundle": "master-dev"
    },
    "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"
        ]
    },
    "minimum-stability": "stable",
    "prefer-stable": true,
    "config": {
        "bin-dir": "bin"
    },
    "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 :(得分:1)

如果您有symfony2.2,请尝试:

composer require friendsofsymfony/rest-bundle:1.5.3

或更新symfony。