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

Cache for classes included by @mixin might not be flushed if file changed #7831

Closed
ComiR opened this issue Aug 22, 2022 · 2 comments
Closed
Labels
Milestone

Comments

@ComiR
Copy link

ComiR commented Aug 22, 2022

Bug report

I changed a method signature in a class only included by @mixin (at least as far as PHPStan can see). Before the change, I already ran PHPStan, so the cache was already created. After the change, PHPStan did obviously use the cache file also for the class/file included by @mixin, as it did not find the now wrong calls to the method.

Code snippet that reproduces the problem

Before: https://phpstan.org/r/bd3b6174-e5ca-4fe3-a89e-9f13f672e1d6
After: https://phpstan.org/r/9483ab8b-38f5-458c-bf03-2bd87793c341

Expected output

Actually the output of "After", not the cached one from "Before".

Did PHPStan help you today? Did it make you happy in any way?

Always makes me happy (but maybe my colleagues not so much 😅).

@ondrejmirtes ondrejmirtes added this to the Easy fixes milestone Sep 21, 2022
@ondrejmirtes
Copy link
Member

Test: phpstan/phpstan-src@2cccd61
Fix: phpstan/phpstan-src@7228d4d

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants