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

don't overwrite reflection cache, when analyzing only a single file in phpstorm #454

Merged
merged 7 commits into from
Nov 21, 2022

Conversation

staabm
Copy link
Owner

@staabm staabm commented Nov 2, 2022

references #443 (comment)

related phpstan discussion phpstan/phpstan#8259

@staabm staabm marked this pull request as ready for review November 2, 2022 08:03
@staabm
Copy link
Owner Author

staabm commented Nov 2, 2022

@noemi-salaun could you please give this change a try. I think it should prevent phpstorm-dba to write/change the result cache file, when the phpstan analysis was started from within phpstorn

@noemi-salaun
Copy link

@staabm It looks good. If I update a query, the new query is added in the cache file but everything else is left untouched in the cache file 👍
If I keep modifying the same request, every change add a new query in the cache file. Obsolete queries are keeped in the cache file even when I run phpstan manually. I need to remove the cache and re-run phpstan to get a clean cache without obsolete queries.

@staabm
Copy link
Owner Author

staabm commented Nov 2, 2022

Obsolete queries are keeped in the cache file even when I run phpstan manually. I need to remove the cache and re-run phpstan to get a clean cache without obsolete queries.

yeah, thats a known issue, see #310
it shouldn't be a problem though, when obsolete queries are contained in the cache file

@staabm
Copy link
Owner Author

staabm commented Nov 2, 2022

I can no longer reproduce the underlying issue. we need a failing unit test first

@staabm staabm closed this Nov 2, 2022
@staabm staabm deleted the stom-fix branch November 2, 2022 18:13
@staabm staabm restored the stom-fix branch November 21, 2022 08:59
@staabm staabm reopened this Nov 21, 2022
@staabm staabm enabled auto-merge (squash) November 21, 2022 09:07
@staabm staabm merged commit 81ace96 into main Nov 21, 2022
@staabm staabm deleted the stom-fix branch November 21, 2022 09:07
clxmstaab added a commit that referenced this pull request Nov 21, 2022
…n phpstorm (#454)

Co-authored-by: Markus Staab <47448731+clxmstaab@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

3 participants