Gitlab Laravel PHPUnit测试运行器警告

huangapple go评论55阅读模式
英文:

Gitlab Laravel PHPUnit test runner warning

问题

当我将Laravel应用程序升级到Laravel 10、PHP 8.1和PHPUnit 10时,我在更新过程的最后遇到了一个错误。所有测试都成功运行,但在最后出现了这个错误。
Gitlab Laravel PHPUnit测试运行器警告
这是phpunit.xml的样子:
Gitlab Laravel PHPUnit测试运行器警告
我需要更新哪些内容,以使其再次正常工作,不显示这个失败的任务?

英文:

When I made Laravel application upgrades to Laravel 10, PHP 8.1, and PHPUnit 10, I am encountering an error at the end of the update process. All tests run successfully, but this error occurs at the end.
Gitlab Laravel PHPUnit测试运行器警告
Here is how phpunit.xml looks like:
Gitlab Laravel PHPUnit测试运行器警告
What I need to update to work again normally and do not show this failed job at the end?

答案1

得分: -1

将以下内容添加到.gitlab-ci.yml文件中:

before_script:
  - cp .platform/gitlab/my_php.ini /usr/local/etc/php/conf.d/99-xdebug.ini

然后,在根目录下,也可以在任何阶段添加,但对我来说更清晰,创建一个名为my_php.ini的文件,放在.platform/gitlab文件夹中,并将以下内容添加到其中:

xdebug.mode=coverage

然后一切都应该正常工作 Gitlab Laravel PHPUnit测试运行器警告

英文:

How to make it work:

Add this line into .gitlab-ci.yml

before_script:
  - cp .platform/gitlab/my_php.ini /usr/local/etc/php/conf.d/99-xdebug.ini

in the root of the file, work as well if added at some stage, but this is more clean for me.

Then make my_php.ini in .platform/gitlab folder with this content:

xdebug.mode=coverage

And all works fine, again Gitlab Laravel PHPUnit测试运行器警告

huangapple
  • 本文由 发表于 2023年6月16日 14:24:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/76487440.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定