-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It would be nice if pcov and phpunit's php-code-coverage communicated over directory filtering #49
Comments
Any update on this? We have just run across the issue in our laravel project where we have introduced a second directory Haven't found a workaround yet |
@fennik you can set |
It tries to be too smart in autodetecting `pcov.directory` and winds up skipping files in some cases. Sigh. krakjoe/pcov#49
While investigating this, I came across this blog post. I'm going to see if xdebug handles this situation better. https://thephp.cc/articles/pcov-or-xdebug EDIT: using xdebug for coverage seems to Just Work ™️ so I'm using that to solve this problem. Hope that helps future searchers who used pcov by default! |
With the default setting of not setting
pcov.directory
, pcov will latch onto either./src
,./lib
or,./app
. Leaving the end user confused why adding extra directories inphpunit.xml
doesn't do anything:sebastianbergmann/php-code-coverage#741
It would be nice if in some way, the directories whitelisted in
phpunit.xml
or--whitelist <dir>
would change a pcov.directory-like filter, according to the Rule of Least Surprise.For now I'll try to see if I can move CentOS and Ubuntu or Debian to write
pcov.directory=.
in/etc/php/7.*/mods-available/pcov.ini
, but that is less optimal and takes a bit of luck to find someone who just had their breakfast and coffee and is in a good mood to apply such a change. It also doesn't 'solve' it anywhere else. Neither is it really a proper solution.Hedging my bets: https://youtrack.jetbrains.com/issue/WI-52914
The text was updated successfully, but these errors were encountered: