-
-
Notifications
You must be signed in to change notification settings - Fork 946
Description
Feature request
The documentation https://phpstan.org/user-guide/result-cache is quite clear to me:
You should always analyse the whole project - the list of paths passed to the analyse command should be the same to take advantage of the result cache. If the list of paths differs from run to run, the cache is rebuilt from the ground up each time.
I experiences this when having a project with two phpstan configuration files:
phpstan.neon
andphpstan-tests.neon
Running phpstan with one config invalidates the result of the other.
The solution was to be explicit about the tmpDir in each configuration file, as documented in https://phpstan.org/config-reference#caching .
Suggestion: would it make sense to consider the "config file name" as part of the cache key so multiple configs wouldn't cancel out each other?
Thanks! :)