New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Caching and multiple configurations for a project #3755
Comments
Hi, there's simply one result cache per You can also probably solve this by merging |
No, they're completely different. Different parameters, different rules, etc.
Oh. But how does this work when I've multiple, completely independently, projects who all default to the system |
Currently yes. |
Uh… 💥 😏 |
Thanks for this discussion, now I know that I have to configure different tmp directories, but it would be even clearer if there where a |
With the recent support of PhpStorm for phpstan, I think I observed the following:
In both cases I use the same configuration. Anyone observing this too? Is this an independent issue or maybe related to this? |
This is currently expected - running PHPStan on a single file overwrites the whole cache and caches the result for that file. |
I guess I could fix it by providing yet another configuration file for the PhpStorm integration with yet another |
I could skip cache-saving in PHPStan when only files are passed on the command line. |
I just made a few improvements to result cache:
So this issue can be closed, because now you can set |
Nice, thank you @ondrejmirtes ! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Feature request
The documentation https://phpstan.org/user-guide/result-cache is quite clear to me:
I experiences this when having a project with two phpstan configuration files:
phpstan.neon
and
phpstan-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! :)
The text was updated successfully, but these errors were encountered: