亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

在 Symfony 4/5 中安裝 orm-fixtures 時發生 Composer 沖突

在 Symfony 4/5 中安裝 orm-fixtures 時發生 Composer 沖突

PHP
哈士奇WWW 2023-11-03 20:10:00
當我嘗試orm-fixtures在 Symfony 5.1中安裝時遇到問題:$ composer require orm-fixtures --devUsing version ^3.3 for doctrine/doctrine-fixtures-bundle./composer.json has been updatedLoading composer repositories with package informationUpdating 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/common 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|install 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
查看完整描述

3 回答

?
富國滬深

TA貢獻1790條經驗 獲得超9個贊

現在,裝置可以干凈地加載,無需任何調整。使用此過程的人可能希望從沖突部分中刪除條令行,并進行另一個作曲家更新以恢復同步。


要重現該問題,請從新的 5.1 項目開始并嘗試安裝固定裝置包:


symfony new --full new_project

cd new_project

composer require --dev orm-fixtures

然后您會收到又大又長的錯誤消息。這是當權者正在努力的事情。實際上有點奇怪的是,這類問題竟然在各種測試過程中都被忽略了。很稀少。


然而,你可以通過做一些原則降級來解決這個問題。將這些學說行添加到composer.json:


    "conflict": {

        "symfony/symfony": "*",

        "doctrine/common": ">= 3.0",

        "doctrine/persistence": "<1.3"

    },

然后,秘密成分是,您應該清除作曲家緩存并進行作曲家更新以實際降級學說:


composer clear-cache

composer update

composer require --dev orm-fixtures

它應該有效。


但同樣,這有望在不久的將來得到解決。


查看完整回答
反對 回復 2023-11-03
?
慕森王

TA貢獻1777條經驗 獲得超3個贊

正如錯誤消息中所寫:最新版本的doctrine/doctrine-fixtures-bundlerequire doctrine/data-fixtures。該軟件包尚不與doctrine/commonv3 兼容,但該版本當前已安裝在您的系統上。

無論您如何安裝doctrine/common,都需要將其降級。如果您需要幫助,請編輯您的問題以包含您的composer.json


查看完整回答
反對 回復 2023-11-03
?
紫衣仙女

TA貢獻1839條經驗 獲得超15個贊

正在修復:https://github.com/doctrine/data-fixtures/pull/349/files

同時您可以通過添加來安裝它


"repositories": [

    {

        "type": "vcs",

        "url": "https://github.com/fruitwasp/data-fixtures"

    }

],

到你的composer.json然后運行


composer require doctrine/data-fixtures:"dev-doctrinecommon as 1.4.3" --dev

composer require orm-fixtures --dev


查看完整回答
反對 回復 2023-11-03
  • 3 回答
  • 0 關注
  • 230 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號