我不明白这位作曲家的要求是什么

时间:2018-08-27 19:30:32

标签: php composer-php

我正在尝试使用此composer.json使用旧的php projet:

{
    "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"
        }
    }
}

运行php composer.phar install时,它会打印:

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].

我不明白这个错误。我该怎么做才能composer.json工作?

1 个答案:

答案 0 :(得分:1)

答案在错误消息中。您需要Symfony版本2.2.4,而doctrine-fixtures-bundle(2.3)需要Symfony 2.3。因此,您必须降低灯具套件版本或提高Symfony版本。目前,您要求的版本无法一起使用。