首页  >  问答  >  正文

Composer 更新给出错误 phpunit/phpunit

我最近安装了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粉852578075P粉852578075316 天前743

全部回复(1)我来回复

  • P粉638343995

    P粉6383439952023-11-09 11:30:15

    您必须升级您的 phpunit 版本以与您的 php 8.1.7 相对应(选择 phpunit 版本 9 或 8,根据官方文档)或降级您的 php 版本以与 phpunit 6.*< /代码>.

    就是这样!

    回复
    0
  • 取消回复