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

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


$ 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


哈士奇WWW
浏览 146回答 3
3回答

富国沪深

现在,装置可以干净地加载,无需任何调整。使用此过程的人可能希望从冲突部分中删除条令行,并进行另一个作曲家更新以恢复同步。要重现该问题,请从新的 5.1 项目开始并尝试安装固定装置包:symfony new --full new_projectcd new_projectcomposer require --dev orm-fixtures然后您会收到又大又长的错误消息。这是当权者正在努力的事情。实际上有点奇怪的是,这类问题竟然在各种测试过程中都被忽略了。很稀少。然而,你可以通过做一些原则降级来解决这个问题。将这些学说行添加到composer.json:&nbsp; &nbsp; "conflict": {&nbsp; &nbsp; &nbsp; &nbsp; "symfony/symfony": "*",&nbsp; &nbsp; &nbsp; &nbsp; "doctrine/common": ">= 3.0",&nbsp; &nbsp; &nbsp; &nbsp; "doctrine/persistence": "<1.3"&nbsp; &nbsp; },然后,秘密成分是,您应该清除作曲家缓存并进行作曲家更新以实际降级学说:composer clear-cachecomposer updatecomposer require --dev orm-fixtures它应该有效。但同样,这有望在不久的将来得到解决。

慕森王

正如错误消息中所写:最新版本的doctrine/doctrine-fixtures-bundlerequire&nbsp;doctrine/data-fixtures。该软件包尚不与doctrine/commonv3 兼容,但该版本当前已安装在您的系统上。无论您如何安装doctrine/common,都需要将其降级。如果您需要帮助,请编辑您的问题以包含您的composer.json

紫衣仙女

正在修复:https://github.com/doctrine/data-fixtures/pull/349/files同时您可以通过添加来安装它"repositories": [&nbsp; &nbsp; {&nbsp; &nbsp; &nbsp; &nbsp; "type": "vcs",&nbsp; &nbsp; &nbsp; &nbsp; "url": "https://github.com/fruitwasp/data-fixtures"&nbsp; &nbsp; }],到你的composer.json然后运行composer require doctrine/data-fixtures:"dev-doctrinecommon as 1.4.3" --devcomposer require orm-fixtures --dev
打开App,查看更多内容
随时随地看视频慕课网APP