Refactor how filtering works

Author: sebastianbergmannCreated Sep 23, 2015Updated Jul 9, 2026
Labelstype/refactoring

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.

Source: sebastianbergmann/php-code-coverage