首页 > 解决方案 > 安装 fos/elasticabundle,需要 pagerfanta 版本

问题描述

我想安装 FOSElasticaBundle,但出现错误。

我不知道该怎么办,系统cmd显示:

C:\xampp\htdocs\project>composer require friendsofsymfony/elastica-bundle
Using version ^5.0 for friendsofsymfony/elastica-bundle
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "4.1.*"
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: don't install friendsofsymfony/elastica-bundle v5.0.3
    - Conclusion: don't install friendsofsymfony/elastica-bundle v5.0.2
    - Conclusion: don't install friendsofsymfony/elastica-bundle v5.0.1
    - Conclusion: remove pagerfanta/pagerfanta v2.0.1
    - Installation request for friendsofsymfony/elastica-bundle ^5.0 -> satisfiable by friendsofsymfony/elastica-bundle[v5.0.0, v5.0.1, v5.0.2, v5.0.3].
    - Conclusion: don't install pagerfanta/pagerfanta v2.0.1
    - friendsofsymfony/elastica-bundle v5.0.0 requires pagerfanta/pagerfanta ^1.0.5 -> satisfiable by pagerfanta/pagerfanta[v1.0.5, v1.1.0].
    - Can only install one of: pagerfanta/pagerfanta[v1.1.0, v2.0.1].
    - Can only install one of: pagerfanta/pagerfanta[v1.0.5, v2.0.1].
    - Installation request for pagerfanta/pagerfanta (locked at v2.0.1) -> satis
fiable by pagerfanta/pagerfanta[v2.0.1].


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

C:\xampp\htdocs\project>

我安装了 pagerfanta,但效果很好。请帮忙。

标签: symfonyelasticsearch

解决方案


friendsofsymfony/elastica-bundle v5.0.0 requires pagerfanta/pagerfanta ^1.0.5 -> satisfiable by pagerfanta/pagerfanta[v1.0.5, v1.1.0].

您已安装 pagerfanta/pagerfanta v2.0.1,因此要使用 elastica-bundle v5.0.3,您需要将其降级到 v1.1.0


推荐阅读