-
Notifications
You must be signed in to change notification settings - Fork 31
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
Feature request : make pcov.directory load from coverage list in phpunit or a config file #86
Comments
That looks like an issue for phpunit and not pcov. they can ini_set it what they want |
Sounds logical would you mind reporting this issue to them, so they might act upon it? |
Actually this is not a fix for this issue. pcov actively refuses to honor anything except global
These issues make it not fit for purpose when handling more complicated application structures. Dozens and dozens of people have run across this issue across Github and StackOverflow, nobody at first glance has any clue why it isn't just observing what's been executed like every other code coverage driver available, and the message here seems to be, "Ah well, someone else's problem." "Ah well, you're not conforming to these preconceptions of app structure I've assumed are universal. Too bad." Pretty frustrating. If I had any lick of C experience I'd give it a crack but unfortunately I wouldn't know where to start. For the time being we'll all have to do what loads of people have done which is use |
Yes, it is very annoying that pcov does not take into account |
Even if this can be only fixed through phpunit, you should ask them to support it (as I mentioned earlier) with providing the steps, I haven't tested it myself but @PeterDKC mentions ini_set doesn't even work. If your library depends on a tool to work, you need to do the compatibility checks for it too. Send a PR, add a feature request, or simply just at least report the issue with steps to fix it... |
Just to be clear about this behavior:
This behavior is incompatible with actual real life application structures, is a complete surprise, and is just really really frustrating to come across. It shouldn't work like this. |
+1 I just ran into this issue when moving files out of my Given that Xdebug works out of the box, whereas pcov doesn't, I worry that others like myself are going to keep using Xdebug for its simplicity in terms of integration. |
And they should, since this package is clearly unmaintained. I don't think there's a proper alternative atm |
So far this is the only thing which it's not that great to work with in your extension, adding
dpcov.directory
manually is a little troublesome you see for instance I use Intellij Idea which let's you run tests with its ui, adding this option every time manually not only is time consuming but it causes a lot of errors by different members of the team.I'm not really familiar with how php extensions are written but if it is possible to read phpunit.xml config directly in your plugin, using the coverage array of includes could easily get the highest root and that could be set as default, that way we can have a better default directory, don't you think so? Xdebug doesn't have this problem as I tested so it's doing something like that.
Example :
#37
#34
and many more like one of mine :
The text was updated successfully, but these errors were encountered: