Collecting here which PHP Tools use caches here and for which usecase.
The widely used sys_get_temp_dir()
method represents TMPDIR
environment variable if not specially sys_temp_dir
is defined in the php.ini
file.
Can avoid reanalyzing unrelated files:
sys_get_temp_dir() . '/phpstan/'
Documentation: https://phpstan.org/config-reference#caching
Can avoid reanalyzing unrelated files:
sys_get_temp_dir() . '/rector_cached_files/'
Requires to be enabled in CI.
Documentation: https://getrector.com/documentation/cache-in-ci
Avoid reanalyzing unchanged files:
getcwd() . '/.php-cs-fixer.cache'
Documentation: https://cs.symfony.com/doc/usage.html#caching
Can be used to rerun defects:
getcwd() . '/.phpunit.result.cache'
Documentation: https://docs.phpunit.de/en/9.6/configuration.html?highlight=cache#the-cacheresult-attribute
Avoid reanalyzing unchanged files:
getcwd() . '/.deptrac.cache'
Documentation: https://github.com/qossmic/deptrac/blob/main/docs/configuration.md#parameters
getcwd() . '/.twig-cs-fixer.cache'
Documentation: https://github.com/VincentLanglet/Twig-CS-Fixer#cache