在Symfony 4/5中安装orm-fixtures时,Composer发生冲突

问题描述

当我尝试在Symfony 5.1 中安装orm-fixtures时遇到问题:

$ composer require orm-fixtures --dev
Using version ^3.3 for doctrine/doctrine-fixtures-bundle
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "5.1.*"
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: don't install doctrine/doctrine-fixtures-bundle 3.3.1
    - Conclusion: remove doctrine/cache 1.10.2
    - Conclusion: don't install doctrine/cache 1.10.2
    - doctrine/common 2.2.1 conflicts with doctrine/cache[1.10.2].
    - doctrine/common 2.2.2 conflicts with doctrine/cache[1.10.2].
    - doctrine/common 2.2.3 conflicts with doctrine/cache[1.10.2].
    - doctrine/common 2.3.0 conflicts with doctrine/cache[1.10.2].
    - Conclusion: don't install doctrine/common 3.0.2|install doctrine/common 2.2.1|install doctrine/common 2.2.2|install doctrine/common 2.2.3|install doctrine/co
mmon 2.3.0
    - Conclusion: don't install doctrine/doctrine-fixtures-bundle 3.3.1|remove doctrine/common 3.0.2|install doctrine/common 2.2.1|install doctrine/common 2.2.2|in
stall doctrine/common 2.2.3|install doctrine/common 2.3.0
    - Conclusion: don't install doctrine/doctrine-fixtures-bundle 3.3.1|don't install doctrine/common 3.0.2|install doctrine/common 2.2.1|install doctrine/common 2
.2.2|install doctrine/common 2.2.3|install doctrine/common 2.3.0
    - Installation request for doctrine/cache (locked at 1.10.2) -> satisfiable by doctrine/cache[1.10.2].
    - Conclusion: don't install doctrine/doctrine-fixtures-bundle 3.3.1|remove doctrine/common 3.0.2|install doctrine/common 2.2.1|install doctrine/common 2.2.2|in
stall doctrine/common 2.2.3|install doctrine/common 2.3.0
    - Conclusion: don't install doctrine/doctrine-fixtures-bundle 3.3.1|don't install doctrine/common 3.0.2|install doctrine/common 2.2.1|install doctrine/common 2
.2.2|install doctrine/common 2.2.3|install doctrine/common 2.3.0
    - Installation request for doctrine/doctrine-fixtures-bundle ^3.3 -> satisfiable by doctrine/doctrine-fixtures-bundle[3.3.0,3.3.1].
    - Conclusion: remove doctrine/common 3.0.2|install doctrine/common 2.2.1|install doctrine/common 2.2.2|install doctrine/common 2.2.3|install doctrine/common 2.
3.0
    - doctrine/doctrine-fixtures-bundle 3.3.0 requires doctrine/data-fixtures ^1.3 -> satisfiable by doctrine/data-fixtures[1.3.3,1.4.0,1.4.1,1.4.2,1.4.3,v1.3
.0,v1.3.1,v1.3.2].
    - doctrine/data-fixtures 1.3.3 requires doctrine/common ~2.2 -> satisfiable by doctrine/common[2.12.0,2.13.0,2.13.1,2.13.2,2.13.3,2.2.0,2.2.1,2.2.2,2.2
.3,2.3.0,v2.10.0,v2.11.0,v2.4.0,v2.4.1,v2.4.2,v2.4.3,v2.5.0,v2.5.1,v2.5.2,v2.5.3,v2.6.0,v2.6.1,v2.6.2,v2.7.0,v2.7.1,v2.7.2,v2.7.3,v2.8.0,v2.8.1,v2.9.0].
    - doctrine/data-fixtures 1.4.0 requires doctrine/common ^2.11 -> satisfiable by doctrine/common[2.12.0,v2.11.0].
    - doctrine/data-fixtures 1.4.1 requires doctrine/common ^2.11 -> satisfiable by doctrine/common[2.12.0,v2.11.0].
    - doctrine/data-fixtures 1.4.2 requires doctrine/common ^2.11 -> satisfiable by doctrine/common[2.12.0,v2.11.0].
    - doctrine/data-fixtures 1.4.3 requires doctrine/common ^2.11 -> satisfiable by doctrine/common[2.12.0,v2.11.0].
    - doctrine/data-fixtures v1.3.0 requires doctrine/common ~2.2 -> satisfiable by doctrine/common[2.12.0,2.
2.3,v2.8.
1,v2.9.0].
    - doctrine/data-fixtures v1.3.1 requires doctrine/common ~2.2 -> satisfiable by doctrine/common[2.12.0,v2.9.0].
    - doctrine/data-fixtures v1.3.2 requires doctrine/common ~2.2 -> satisfiable by doctrine/common[2.12.0,v2.9.0].
    - Can only install one of: doctrine/common[2.12.0,3.0.2].
    - Can only install one of: doctrine/common[2.13.0,3.0.2].
    - Can only install one of: doctrine/common[2.13.1,3.0.2].
    - Can only install one of: doctrine/common[2.13.2,3.0.2].
    - Can only install one of: doctrine/common[2.13.3,3.0.2].
    - Can only install one of: doctrine/common[v2.11.0,3.0.2].
    - Can only install one of: doctrine/common[2.2.0,3.0.2].
    - Can only install one of: doctrine/common[v2.10.0,3.0.2].
    - Can only install one of: doctrine/common[v2.4.0,3.0.2].
    - Can only install one of: doctrine/common[v2.4.1,3.0.2].
    - Can only install one of: doctrine/common[v2.4.2,3.0.2].
    - Can only install one of: doctrine/common[v2.4.3,3.0.2].
    - Can only install one of: doctrine/common[v2.5.0,3.0.2].
    - Can only install one of: doctrine/common[v2.5.1,3.0.2].
    - Can only install one of: doctrine/common[v2.5.2,3.0.2].
    - Can only install one of: doctrine/common[v2.5.3,3.0.2].
    - Can only install one of: doctrine/common[v2.6.0,3.0.2].
    - Can only install one of: doctrine/common[v2.6.1,3.0.2].
    - Can only install one of: doctrine/common[v2.6.2,3.0.2].
    - Can only install one of: doctrine/common[v2.7.0,3.0.2].
    - Can only install one of: doctrine/common[v2.7.1,3.0.2].
    - Can only install one of: doctrine/common[v2.7.2,3.0.2].
    - Can only install one of: doctrine/common[v2.7.3,3.0.2].
    - Can only install one of: doctrine/common[v2.8.0,3.0.2].
    - Can only install one of: doctrine/common[v2.8.1,3.0.2].
    - Can only install one of: doctrine/common[v2.9.0,3.0.2].
    - Installation request for doctrine/common (locked at 3.0.2) -> satisfiable by doctrine/common[3.0.2].


Installation failed,reverting ./composer.json to its original content.

这是我得到的错误。

我知道这个问题来自我的库的版本,但是我不知道如何解决,我今天才开始使用Symfony。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)