简体   繁体   中英

I don't understand what is wrong with this composer requires

I'm trying to make working an old php projet with this composer.json :

{
    "minimum-stability": "dev",
    "name": "symfony/framework-standard-edition",
    "description": "The \"Symfony Standard Edition\" distribution",
    "autoload": {
        "psr-0": { "": "src/" }
    },
    "require": {
        "php": ">=5.3.3",
        "symfony/symfony": "v2.2.4",
        "doctrine/orm": "2.3.4",
        "doctrine/doctrine-bundle": "v1.2.0",
        "twig/extensions": "1.0.*@dev",
        "symfony/assetic-bundle": "v2.3.0",
        "symfony/swiftmailer-bundle": "v2.2.3",
        "symfony/monolog-bundle": "v2.2.0",
        "sensio/distribution-bundle": "v2.2.3",
        "sensio/framework-extra-bundle": "v2.2.3",
        "sensio/generator-bundle": "v2.2.3",
        "jms/security-extra-bundle": "1.5.1",
        "jms/di-extra-bundle": "1.4.0",
        "kriswallsmith/assetic": "v1.1.1",

        "friendsofsymfony/user-bundle": "v1.3.1",
        "doctrine/data-fixtures" : "v1.0.0-ALPHA4", 
        "doctrine/doctrine-fixtures-bundle": "2.3.0",
        "stof/doctrine-extensions-bundle": "v1.2.0",  
        "gregwar/image-bundle": "2.2.1",
        "cedriclombardot/admingenerator-generator-bundle": "v1.0.0",
        "cedriclombardot/twig-generator": "v1.0.0",
        "white-october/pagerfanta-bundle": "2.1.*@dev",
        "pagerfanta/pagerfanta": "1.0.*@dev",
        "shtumi/useful-bundle": "dev-master#c48ef1a",
        "sonata-project/doctrine-orm-admin-bundle": "2.2.1",
        "sonata-project/admin-bundle": "2.2.2",
        "sonata-project/jquery-bundle": "1.8.*@dev",
        "sonata-project/block-bundle": "2.2.3",
        "friendsofsymfony/facebook-bundle": "1.2.1",

        "doctrine/mongodb-odm-bundle": "v3.0.0-BETA4",
        "doctrine/mongodb-odm": "1.0.0-BETA9",
        "symfony/options-resolver": "v2.2.4",
        "symfony/doctrine-bridge": "v2.2.4",
        "doctrine/mongodb": "1.0.0-BETA1"


    },
    "scripts": {
        "post-install-cmd": [
            "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": [
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
        ]
    },
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web",
        "branch-alias": {
            "dev-master": "2.1-dev"
        }
    }
}

When run php composer.phar install it print:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for symfony/symfony v2.2.4 -> satisfiable by symfony/symfony[v2.2.4].
    - doctrine/doctrine-fixtures-bundle 2.3.0 requires symfony/doctrine-bridge ~2.3|~3.0 -> satisfiable by symfony/symfony[2.3.x-dev, 2.4.x-dev, 2.5.x-dev, 2.6.x-dev, 2.7.x-dev, 2.8.x-dev, 3.0.x-dev, 3.1.x-dev, 3.2.x-dev, 3.3.x-dev, 3.4.x-dev], symfony/doctrine-bridge[2.3.x-dev, 2.4.x-dev, 2.5.x-dev, 2.6.x-dev, 2.7.x-dev, 2.8.x-dev, 3.0.x-dev, 3.1.x-dev, 3.2.x-dev, 3.3.x-dev, 3.4.x-dev].
    - Can only install one of: symfony/symfony[v2.2.4, 2.3.x-dev].
    - Can only install one of: symfony/symfony[v2.2.4, 2.4.x-dev].
    - Can only install one of: symfony/symfony[v2.2.4, 2.5.x-dev].
    - Can only install one of: symfony/symfony[v2.2.4, 2.6.x-dev].
    - Can only install one of: symfony/symfony[v2.2.4, 2.7.x-dev].
    - Can only install one of: symfony/symfony[v2.2.4, 2.8.x-dev].
    - Can only install one of: symfony/symfony[v2.2.4, 3.0.x-dev].
    - Can only install one of: symfony/symfony[v2.2.4, 3.1.x-dev].
    - Can only install one of: symfony/symfony[v2.2.4, 3.2.x-dev].
    - Can only install one of: symfony/symfony[v2.2.4, 3.3.x-dev].
    - Can only install one of: symfony/symfony[v2.2.4, 3.4.x-dev].
    - don't install symfony/doctrine-bridge 2.3.x-dev|don't install symfony/symfony v2.2.4
    - don't install symfony/doctrine-bridge 2.4.x-dev|don't install symfony/symfony v2.2.4
    - don't install symfony/doctrine-bridge 2.5.x-dev|don't install symfony/symfony v2.2.4
    - don't install symfony/doctrine-bridge 2.6.x-dev|don't install symfony/symfony v2.2.4
    - don't install symfony/doctrine-bridge 2.7.x-dev|don't install symfony/symfony v2.2.4
    - don't install symfony/doctrine-bridge 2.8.x-dev|don't install symfony/symfony v2.2.4
    - don't install symfony/doctrine-bridge 3.0.x-dev|don't install symfony/symfony v2.2.4
    - don't install symfony/doctrine-bridge 3.1.x-dev|don't install symfony/symfony v2.2.4
    - don't install symfony/doctrine-bridge 3.2.x-dev|don't install symfony/symfony v2.2.4
    - symfony/doctrine-bridge 3.3.x-dev conflicts with symfony/symfony[v2.2.4].
    - symfony/doctrine-bridge 3.4.x-dev conflicts with symfony/symfony[v2.2.4].
    - Installation request for doctrine/doctrine-fixtures-bundle 2.3.0 -> satisfiable by doctrine/doctrine-fixtures-bundle[2.3.0].

I d'ont understand the error. What can i do to make working this composer.json ?

The answer is in the error message. You are requiring Symfony version 2.2.4 while the doctrine-fixtures-bundle(2.3) requires Symfony 2.3. So you have to either lower the fixtures bundle version or up the Symfony version. Right now the versions you are asking for can't work together.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM