Skip to content
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

[RFC] Remove blacklist and make whitelist mandatory #385

Closed
sebastianbergmann opened this issue Sep 23, 2015 · 9 comments
Closed

[RFC] Remove blacklist and make whitelist mandatory #385

sebastianbergmann opened this issue Sep 23, 2015 · 9 comments

Comments

@sebastianbergmann
Copy link
Owner

Triggered by #384, I started thinking about how complex (and perceived by many users as complicated) the blacklist and whitelist functionality of PHPUnit and PHP_CodeCoverage is.

A radical approach to make this simpler, both for those working on PHP_CodeCoverage and those that use PHPUnit, could be to remove the blacklist and make the whitelist mandatory. Current versions of PHPUnit already emit a warning when code coverage is activated but no whitelist is configured.

Thoughts?

@michaelmoussa
Copy link

👍 I would like this. The first thing I do in any new phpunit.xml is blacklist the entire project and then whitelist what I want anyway. I suspect that is the case for the overwhelming majority of projects these days.

@stof
Copy link

stof commented Sep 23, 2015

👍 for this. I always use a whitelist anyway. This is even more likely in the age of composer: if you don't define a whitelist, the code coverage will include anything from your vendor folder, which is not blacklisted automatically by PHPUnit. so not using a whitelist generates wunky coverage by default for composer users.

@GrahamCampbell
Copy link
Contributor

👍

1 similar comment
@fpietka
Copy link
Contributor

fpietka commented Sep 23, 2015

👍

@MajorCaiger
Copy link
Contributor

👍 I always use whitelist and never use blacklist

@JanPietrzyk
Copy link

+1 Black & Whitelist do not serve the purpose of clean code.

@sandermarechal
Copy link

+1

1 similar comment
@sebastianfeldmann
Copy link

👍

@sebastianbergmann
Copy link
Owner Author

PHPUnit 5.0 has been changed: sebastianbergmann/phpunit@0fd7f2c

The respective functionality will be removed from PHP_CodeCoverage 3.0 in time for the PHPUnit 5.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants