Skip to content

Coverage cache should use relative paths. #947

@thirsch

Description

@thirsch
Q A
php-code-coverage version >= 9.2.17
Installation Method Composer
Usage Method PHPUnit
PHPUnit version (if used) 9.5.25

The cache file lookup uses the absolute path of both, the cache scripts of this project (introduced here: acd254e) and the absolut path of covered file of the project under test. As we are running subsequent builds of our project in different paths (including the build number e.g.), we can't use the cache much, as every run causes a miss and would only produce tons of duplicates in a shared cache folder.

Would it be possible to change both path to use relative path to the files? As both methods are using the content of the file as well, it should be sufficient to build unique cache hashes. What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions