sebastianbergmann / sebastianbergmann/php-code-coverage
Refactor how filtering works
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 8.9k
- Forks
- 385
- Avg merge
- 12h 25m
- Merged PRs (30d)
- 31
Description
Right now, File_Iterator is used to crawl the filesystem for files that match the criteria specified in the (PHPUnit) configuration resulting in a list (array) of files that are to be included in the code coverage report. This crawling is responsible for a slowdown in the startup of PHPUnit.
It would be better to store the information ("all *.php files in directory src) instead and match the filenames against that instead of a list generated through crawling.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading File_Iterator and the PHPUnit configuration filtering path to understand how criteria become the crawled file list. Compare that flow with storing directory and pattern information and matching filenames later. Done means preserving the selected files in coverage reports while reducing PHPUnit startup slowdown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100