paratestphp/paratest

Cache for static analysis has not been configured

jorgsowa opened this issue ยท 3 comments

Q A
ParaTest version 7.3.1
PHPUnit version 10.5.3
PHP version 8.2.14

Summary

I get the error Cache for static analysis has not been configured when I run the following command:

XDEBUG_MODE=coverage vendor/bin/paratest --coverage-clover=integration-coverage-result.xml

The problem disappears when I run through PHPUnit or add the following row to the phpunit.xml configuration:

<coverage cacheDirectory=".phpunit.cache"/>

Current behavior

Tests don't run

ParaTest v7.3.1 upon PHPUnit 10.5.3 by Sebastian Bergmann and contributors.

Cache for static analysis has not been configured

Expected behavior

Tests are executed.

This is the expected behaviour

Unfortunately, it's not documented anywhere and the error is coming from PHPUnit, not Paratest itself, which is confusing. At least this error now will be searchable.

For me, cacheDirectory=".phpunit.cache" needed to be inside of the phpunit tag:

<phpunit cacheDirectory=".phpunit.cache">
...
</phpunit>