sonata-userbundle和fos-userbundle依赖项

时间:2013-09-11 17:59:30

标签: symfony symfony-2.1 sonata-admin symfony-sonata

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

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

任何人都有一个想法如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

为了解决冲突变化......

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

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

...或者只是完全删除该行,让composer获取正确的依赖关系。

dev-master的{​​{1}}分支与sonata-project/doctrine-extensions不兼容。

这就是作曲家在错误信息中告诉你的。