1

我在运行时安装 sonata-userbundle 时遇到问题php composer.phar update我收到此错误:

 Problem 1
- Installation request for sonata-project/user-bundle 2.1.x-dev -> satisfiable by sonata-project/user-bundle[2.1.x-dev].
- sonata-project/user-bundle 2.1.x-dev requires sonata-project/doctrine-extensions 1.* -> satisfiable by sonata-project/doctrine-extensions[1.0.0, 1.0.1].
- Can only install one of: sonata-project/doctrine-extensions[dev-master, 1.0.0].
- Can only install one of: sonata-project/doctrine-extensions[dev-master, 1.0.1].
- Installation request for sonata-project/doctrine-extensions dev-master -> satisfiable by sonata-project/doctrine-extensions[dev-master].

我希望在我的项目中安装供应商,每次尝试更改捆绑包的版本时都会遇到相同的错误,这里是我的 composer.json :

{
"name": "12digital/base-symfony",
"description": "A Symfony based project made by 12digital.com",
"homepage": "http://www.12digital.com",
"autoload": {
    "psr-0": {
        "": "src/"
    }
},
"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/brainwasher/StofDoctrineExtensionsBundle.git"
    },
    {
        "type": "vcs",
        "url": "https://github.com/brainwasher/DoctrineExtensions.git"
    },
    {
        "type":"vcs",
        "url":"https://github.com/Nekland/FeedBundle.git"
    }
],
"require": {
    "php": ">=5.3.3",
    "symfony/symfony": "2.1.*",
    "doctrine/orm": ">=2.2.3,<2.4-dev",
    "doctrine/doctrine-bundle": "1.1.*",
    "twig/extensions": "1.0.*",
    "symfony/assetic-bundle": "2.1.*",
    "symfony/swiftmailer-bundle": "2.1.*",
    "symfony/monolog-bundle": "2.1.*",
    "sensio/distribution-bundle": "2.1.*",
    "sensio/framework-extra-bundle": "2.1.*",
    "sensio/generator-bundle": "2.1.*",
    "jms/security-extra-bundle": "1.2.*",
    "jms/di-extra-bundle": "1.1.*",
    "sonata-project/admin-bundle": "2.1.x",
    "sonata-project/block-bundle": "2.2.*@dev",
    "sonata-project/cache-bundle": "dev-master",
    "sonata-project/jquery-bundle": "dev-master",
    "knplabs/knp-menu-bundle": "1.1.x-dev",
    "knplabs/knp-menu": "1.1.x-dev",
    "sonata-project/exporter": "dev-master",
    "sonata-project/doctrine-orm-admin-bundle": "2.1.x",
    "sonata-project/user-bundle": "2.1.x-dev",
    "sonata-project/easy-extends-bundle": "dev-master",
    "friendsofsymfony/user-bundle": "v1.3.1 as dev-master",
    "sonata-project/doctrine-extensions": "dev-master",
    "zetacomponents/base": "1.8",
    "gedmo/doctrine-extensions": "2.3.*",
    "stof/doctrine-extensions-bundle": "dev-master",
    "genemu/form-bundle": "2.1.x-dev",
    "nekland/feed-bundle": "dev-master",
    "dannytrue/phpthumb": "2.0.*",
    "jms/job-queue-bundle": "dev-master",
    "pagerfanta/pagerfanta": "dev-master",
    "stfalcon/tinymce-bundle": "dev-master",
    "doctrine/doctrine-migrations-bundle": "dev-master",
    "nelmio/solarium-bundle": "2.*",
    "knplabs/knp-paginator-bundle": "dev-master",
    "jms/payment-core-bundle": "*",
    "jms/payment-paypal-bundle": "*",
    "excelwebzone/recaptcha-bundle": "*"
},
"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"
    ]
},
"minimum-stability": "dev",
"extra": {
    "symfony-app-dir": "app",
    "symfony-web-dir": "web",
    "symfony-assets-install": "symlink"
}
}

任何人都知道如何解决这个问题?

4

1 回答 1

0

为了解决冲突更改...

"sonata-project/doctrine-extensions": "dev-master",

"sonata-project/doctrine-extensions": "1.*",

...或者只是完全删除该行并让作曲家获取正确的依赖项。

dev-master分支与sonata-project/doctrine-extensions不兼容sonata-project/user-bundle 2.1.x-dev

这就是作曲家在错误消息中告诉您的内容。

于 2013-09-11T19:06:16.293 回答