sebastianbergmann / phpcov

TextUI frontend for php-code-coverage
BSD 3-Clause "New" or "Revised" License
223 stars 58 forks source link

Missing "--configuration" option for "merge" command #78

Closed matthiasnoback closed 5 years ago

matthiasnoback commented 6 years ago

At this moment, the merge command has no configuration option (execute does). I thought about submitting it as a PR (shouldn't be a difficult one), but maybe I'm missing a reason for not doing so. Please let me know if it's a good idea to work on this :)

sebastianbergmann commented 6 years ago

I don't recall a reason for not having a configuration option for merge.

matthiasnoback commented 6 years ago

Thanks, I'll work on it then!

matthiasnoback commented 6 years ago

I looked at this, and though the change itself is really small (there's already a method handleConfiguration() in the parent BaseCommand), it has no useful effect because CodeCoverage::merge() merges whitelisted files from both CodeCoverage instances. This is nice, since merging would be the equivalent of a union operation, but I was looking for a way to apply the original filtering to the merged CodeCoverage object.

I guess the easiest solution would be to add some "flag" parameter to merge() (bool $preserveFilterConfiguration). When true, this would basically skip the array_merge() call.

What are your thoughts on this?

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had activity within the last 60 days. It will be closed after 7 days if no further activity occurs. Thank you for your contributions.

stale[bot] commented 5 years ago

This issue has been automatically closed because it has not had activity since it was marked as stale. Thank you for your contributions.