Skip to content
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

A way to overcome PHPStan caches? #1

Open
tolk-vm opened this issue Nov 20, 2022 · 0 comments
Open

A way to overcome PHPStan caches? #1

tolk-vm opened this issue Nov 20, 2022 · 0 comments

Comments

@tolk-vm
Copy link
Contributor

tolk-vm commented Nov 20, 2022

PHPStan has internal caches. They help it not to scan a whole project every time, but to scan only changed files and their dependents.

But PHPStan knows nothing about Modulite configs (about .modulite.yaml files), that they also refer to PHP symbols. This lack faces us with problems: once yaml files are changed, PHPStan doesn't but checks for PHP files thay may be affected. Due to caching, we may see previous errors, or don't see errors where they are expected — for unchanged files.

Dropping caches (with phpstan clear-result-cache) or launching with --debug always works.

What can be done?
An acceptable solution. Once any yaml file has changed, all cache drops off automatically.
An ideal solution. Symbols in yaml files are treated as references from PHP code (classes, methods, etc.). Once a yaml file has changed, PHPStan should invalidate symbols referenced from it (both from previous and current versions).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant