无法使用Symfony 2.3.7安装FOSCommentBundle

时间:2013-11-24 03:19:01

标签: symfony symfony-2.3 foscommentbundle

我在使用Symfony 2.3.7时遇到依赖性问题。这是一个全新的Symfony安装,下载2.3.7没有Vendors zip。为初始安装运行composer update。然后将注释包添加到composer.json并再次运行composer update。

composer.json的require部分,

"require": {
    "php": ">=5.3.3",
    "symfony/symfony": "2.3.*",
    "doctrine/orm": ">=2.2.3,<2.4-dev",
    "doctrine/doctrine-bundle": "1.2.*",
    "twig/extensions": "1.0.*",
    "symfony/assetic-bundle": "2.3.*",
    "symfony/swiftmailer-bundle": "2.3.*",
    "symfony/monolog-bundle": "2.3.*",
    "sensio/distribution-bundle": "2.3.*",
    "sensio/framework-extra-bundle": "2.3.*",
    "sensio/generator-bundle": "2.3.*",
    "incenteev/composer-parameter-handler": "~2.0",
    "friendsofsymfony/comment-bundle": "2.0.5"
},

来自'php composer.phar update'的错误

Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: remove symfony/symfony v2.3.7
    - Conclusion: don't install symfony/symfony v2.3.7
    - Conclusion: don't install symfony/symfony v2.3.6
    - Conclusion: don't install symfony/symfony v2.3.5
    - Conclusion: don't install symfony/symfony v2.3.4
    - Conclusion: don't install symfony/symfony v2.3.3
    - Installation request for friendsofsymfony/comment-bundle 2.0.5 -> satisfiable by friendsofsymfony/comment-bundle[v2.0.5].
    - Conclusion: don't install symfony/symfony v2.3.2
    - Conclusion: don't install symfony/symfony v2.3.1
    - friendsofsymfony/comment-bundle v2.0.5 requires symfony/symfony >=2.1,<2.3-dev -> satisfiable by symfony/symfony[v2.1.0, v2.1.1, v2.1.10, v2.1.11, v2.1.12, v2.1.13, v2.1.2, v2.1.3, v2.1.4, v2.1.5, v2.1.6, v2.1.7, v2.1.8, v2.1.9, v2.2.0, v2.2.1, v2.2.10, v2.2.2, v2.2.3, v2.2.4, v2.2.5, v2.2.6, v2.2.7, v2.2.8, v2.2.9].
    - Can only install one of: symfony/symfony[v2.3.0, v2.1.0].
    - Can only install one of: symfony/symfony[v2.3.0, v2.1.1].
    - Can only install one of: symfony/symfony[v2.3.0, v2.1.10].
    - Can only install one of: symfony/symfony[v2.3.0, v2.1.11].
    - Can only install one of: symfony/symfony[v2.3.0, v2.1.12].
    - Can only install one of: symfony/symfony[v2.3.0, v2.1.13].
    - Can only install one of: symfony/symfony[v2.3.0, v2.1.2].
    - Can only install one of: symfony/symfony[v2.3.0, v2.1.3].
    - Can only install one of: symfony/symfony[v2.3.0, v2.1.4].
    - Can only install one of: symfony/symfony[v2.3.0, v2.1.5].
    - Can only install one of: symfony/symfony[v2.3.0, v2.1.6].
    - Can only install one of: symfony/symfony[v2.3.0, v2.1.7].
    - Can only install one of: symfony/symfony[v2.3.0, v2.1.8].
    - Can only install one of: symfony/symfony[v2.3.0, v2.1.9].
    - Can only install one of: symfony/symfony[v2.3.0, v2.2.0].
    - Can only install one of: symfony/symfony[v2.3.0, v2.2.1].
    - Can only install one of: symfony/symfony[v2.3.0, v2.2.10].
    - Can only install one of: symfony/symfony[v2.3.0, v2.2.2].
    - Can only install one of: symfony/symfony[v2.3.0, v2.2.3].
    - Can only install one of: symfony/symfony[v2.3.0, v2.2.4].
    - Can only install one of: symfony/symfony[v2.3.0, v2.2.5].
    - Can only install one of: symfony/symfony[v2.3.0, v2.2.6].
    - Can only install one of: symfony/symfony[v2.3.0, v2.2.7].
    - Can only install one of: symfony/symfony[v2.3.0, v2.2.8].
    - Can only install one of: symfony/symfony[v2.3.0, v2.2.9].
    - Installation request for symfony/symfony 2.3.* -> satisfiable by symfony/symfony[v2.3.0, v2.3.1, v2.3.2, v2.3.3, v2.3.4, v2.3.5, v2.3.6, v2.3.7].

3 个答案:

答案 0 :(得分:2)

我觉得问题在这里,你有symfony&gt; 2.3,但评论要求&lt; 2.3

friendsofsymfony/comment-bundle v2.0.5 requires symfony/symfony >=2.1,<2.3-dev

尝试安装this version条评论

"friendsofsymfony/comment-bundle": "2.0.*@dev"

composer.json 中使用此标志(不是必需的,强制所有依赖项为dev last dev版本)

"minimum-stability": "dev"

答案 1 :(得分:1)

前两行解释了一切:

  friendsofsymfony / comment-bundle v2.0.4需要jms / serializer 1.0.*@dev - &gt;找不到匹配的包。

看着你的作曲家,json,你有0.13。 @dev,而不是1.0。 @dev

  

symfony / framework-bundle 2.0.7需要symfony / translator 2.0.7 - &gt;找不到匹配的包。

查看你的composer.json,你已经安装了2.3。*,而不是2.0。

我认为您尝试安装旧版本的foscommentbundle和旧版本的jms序列化程序包。

答案 2 :(得分:-1)

删除行“jms / serializer-bundle”:“1.0。@ dev” 并运行 composer update 。 这将删除任何旧版本的序列化程序。 之后你可以稍后添加 “jms / serializer-bundle”:“0.13.*@dev” 如果你想。