Composer 更新給定錯誤 phpunit/phpunit
P粉852578075
P粉852578075 2023-11-08 15:34:22
0
1
732

我最近安裝了php(8.1.7)和composer(2.3.7)和laravel 9; 現在我在運行命令時收到此錯誤 composer 更新 在一個laravel專案中,我搜尋了很多但沒有找到確切的解決方案,所有這些都沒有討論phpunit/phpunit的問題。

錯誤如下所示:

Problem 1
    - phpunit/phpunit[6.0.0, ..., 6.5.14] require php ^7.0 -> your php version (8.1.7) does not satisfy that requirement.
    - Root composer.json requires phpunit/phpunit ~6.0 -> satisfiable by phpunit/phpunit[6.0.0, ..., 6.5.14].```


#
P粉852578075
P粉852578075

全部回覆(1)
P粉638343995

您必須升級您的phpunit 版本以與您的php 8.1.7 相對應(選擇phpunit 版本9 或8,根據官方文件)或降級您的php 版本以與phpunit 6.*.

就是這樣!

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!