Skip to content

Result cache not used because an error occurred while loading the cache file #4200

@bendavies

Description

@bendavies

Bug report

v0.12.57
First, I noticed caching was not working, using -vvv revealed:

Result cache not used because an error occurred while loading the cache file: Call to undefined static method _HumbugBoxf99c1794c57d\Nette\DI\Definitions\Statement::__set_state()

Then upgraded to v0.12.59, and we get:

Result cache not used because an error occurred while loading the cache file: Class '_HumbugBoxf99c1794c57d\Nette\DI\Definitions\Statement' not found

fixable by
rm -rf cache-directory

Can phpstan be made more tolerant to invalid caches?
The above issue means i have to manually clear the cache in our CI job.
Can phpstan clear its own cache if an invalid state is detected?

Code snippet that reproduces the problem

NA

Expected output

Caching works!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions