When I tried to get coverage with xdebug by running the unit test of laravel, I got the following error:If anyone knows how to deal with it, I would appreciate it if you could let me know.
Output coverage report when running a test on phpunit.
php.ini
[xdebug]
zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20210902/xdebug.so
xdebug.mode=develop,coverage,debug,gcstats,profile,trace
xdebug.start_with_request=yes
xdebug.client_host='host.docker.internal'
xdebug.client_port = 9003
xdebug.log = "/var/log/xdebug.log"
xdebug.discover_client_host=1
xdebug.remote_handler="dbgp"
phpunit.xml
...
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./app</directory>
</include>
<report>
<html outputDirectory="code-coverage" lowUpperBound="50" highLowerBound="90"/>
</report>
</coverage>
・・・
Ravel Framework 9.23.0
PHP 8.1.9 (cli) (build: Aug 4 2022 21:05:41) (NTS)
Copyright(c)The PHP Group
Zend Engine v4.1.9, Copyright(c)Zend Technologies
with Zend OPcache v8.1.9, Copyright(c), by Zend Technologies
with Xdebug v3.1.5, Copyright (c) 2002-2022, by Derick Rethans
I'm asking the same question in terateil.
https://teratail.com/questions/i9ikbm4r40si6h
I forgot that xdebug.ini was prepared separately.It was reflected here.
© 2024 OneMinuteCode. All rights reserved.