Symfonyにsonataadminをインストールできません

Aug 20 2020

symfony 4.4をフルインストールしてから、sonata-project / doctrine-orm-admin-bundleをインストールしようとしました。箱から出して、これは機能しません。誰かがこれを説明できますか?

symfony5を使用しても同じエラーが発生しました。

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for sonata-project/doctrine-orm-admin-bundle ^3.21 -> satisfiable by sonata-project/doctrine-orm-admin-bundle[3.21.0].
    - Conclusion: remove twig/twig v3.0.5
    - Conclusion: don't install twig/twig v3.0.5
    - sonata-project/doctrine-orm-admin-bundle 3.21.0 requires twig/twig ^1.41 || ^2.10 -> satisfiable by twig/twig[v2.12.0, v2.12.1, v2.12.2, v2.12.3, v2.12.4, v2.12.5, v2.13.0, v2.13.1].
    - Can only install one of: twig/twig[v2.12.0, v3.0.5].
    - Can only install one of: twig/twig[v2.12.1, v3.0.5].
    - Can only install one of: twig/twig[v2.12.2, v3.0.5].
    - Can only install one of: twig/twig[v2.12.3, v3.0.5].
    - Can only install one of: twig/twig[v2.12.4, v3.0.5].
    - Can only install one of: twig/twig[v2.12.5, v3.0.5].
    - Can only install one of: twig/twig[v2.13.0, v3.0.5].
    - Can only install one of: twig/twig[v2.13.1, v3.0.5].
    - Installation request for twig/twig (locked at v3.0.5, required as ^2.12|^3.0) -> satisfiable by twig/twig[v3.0.5].

回答

1 NuggetsMaster Aug 24 2020 at 19:14

ソナタをインストールする前に、指定されたバージョンの小枝の1つをインストールする必要があります。

ソナタは小枝に依存しています。

JonasdeHerdt Aug 21 2020 at 13:44

使用composerrequire "sonata-project / admin-bundle:^ 3.56" "twig / twig:^ 2.10"