-
Notifications
You must be signed in to change notification settings - Fork 659
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
Consistent error logging for cache #8415
Consistent error logging for cache #8415
Conversation
90a36d3
to
fad498a
Compare
@orklah there is a bug in psalm unrelated to this PR? Could you please quickly check Test fails: https://github.com/vimeo/psalm/runs/7860346355?check_suite_focus=true (which will cause other tests to fail too), due to $config being null (how is this even possible when construct is called with Config, as it should already give an error then??) When I add a check for that, it says config cannot be null: |
Fixing #7877 would be nice. |
Ok so I guess I will put back the call to static config as it was there before. (since properly fixing this would mean rewriting tons of code that is unrelated to this PR) |
e8e43d2
to
8c20f01
Compare
f483a8f
to
c0d2ca6
Compare
Sorry for the gazillion commits/reworks, but there's some unexplainable behavior with a hash in some cases (left that as is) and some other unpleasantries by bad cache/test set up in psalm. This branch has slightly meandered from what it started out, as I didn't want to create tons of duplicate code for this PR, so I had to remove existing duplicate code and streamline it. This is finally ready to be merged now. |
* use exceptions instead of error_log for ParserCacheProvider like all other cache providers do * remove duplicate code in ParserCacheProvider * use same hash as other cache providers * update Config.php cache directory creation to use same code as ParserCacheProvider
Revert "update leftover md5 in provider to commonly used hash" This reverts commit 66337ec. partially put back Update StatementsProvider.php
* fix rare race condition on file cache unlink * remove unnecessary reset() * improve code readability using variable
c0d2ca6
to
62df25a
Compare
Thanks |
Generally, psalm throws errors in cache.
However there were 2 places, where error_log was used/leftover from early versions. Changed now for consistency.