Skip to content

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

@ComiR

Description

@ComiR

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 😅).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions