首页 > 解决方案 > 在 Symfony 5 中使用 composer 安装 EasyAdmin 的问题

问题描述

我在 Symfony 5 中开始了一个新项目,并尝试安装 EasyAdmin,composer require easycorp/easyadmin-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 easycorp/easyadmin-bundle v3.1.3
    - Conclusion: don't install easycorp/easyadmin-bundle v3.1.2
    - Conclusion: don't install easycorp/easyadmin-bundle v3.1.1
    - Conclusion: don't install easycorp/easyadmin-bundle v3.1.0
    - Conclusion: don't install easycorp/easyadmin-bundle v3.0.2
    - Conclusion: don't install easycorp/easyadmin-bundle v3.0.1
    - Conclusion: remove doctrine/common 3.0.2
    - Installation request for easycorp/easyadmin-bundle ^3.0 -> satisfiable by easycorp/easyadmin-bundle[v3.0.0, v3.0.1, v3.0.2, v3.1.0, v3.1.1, v3.1.2, v3.1.3].
    - Conclusion: don't install doctrine/common 3.0.2
    - easycorp/easyadmin-bundle v3.0.0 requires doctrine/common ^2.8 -> satisfiable by doctrine/common[2.12.0, 2.13.0, 2.13.1, 2.13.2, 2.13.3, v2.10.0, v2.11.0, v2.8.0, v2.8.1, 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[v2.10.0, 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].

你有解决它的想法吗?

标签: symfonycomposer-phpeasyadmin

解决方案


Easyadmin 依赖于学说/通用 v2,您需要删除当前的学说版本,composer remove doctrine/common然后您可以安装 easyadmin


推荐阅读