作曲家更新给出了错误phpunit/phpunit

发布于 2025-02-10 07:37:39 字数 441 浏览 1 评论 0 原文

我最近安装了PHP(8.1.7)和作曲家(2.3.7)和Laravel 9; 现在,我在运行命令时会遇到此错误 作曲家更新 在一个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].```

I recently installed php (8.1.7) and composer (2.3.7) and laravel 9;
Now I am getting this error while running the command
composer update
on a laravel project, I searched a lot but couldn't find exact solution, all of them were not discussing the issue of phpunit/phpunit.

The error looks like this:


  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].```

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

国粹 2025-02-17 07:37:39

您必须升级 phpunit 版本与您的 php 8.1.7 在phpunit版本9或8 之间选择,根据官方文档)或将PHP版本降级到可与 phpunit 6。 。

就是这样 !

You have to upgrade your phpunit version to correspond with your php 8.1.7 (choose between phpunit version 9 or 8, according to the official documentation) or downgrade your php version to works with phpunit 6.*.

That's it !

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文