Coverage cache should use relative paths.
| 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: https://github.com/sebastianbergmann/php-code-coverage/commit/acd254eb5eb09e26c2ec1bf407230d162d2db453) 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?
Duplicate of https://github.com/sebastianbergmann/php-code-coverage/issues/925
Duplicate of #925
Not really.