Skip to content

Proposal: Add config option to disable DI definition change cache invalidation invalidateResultCacheOnDiDefinitionChange#455

Description

@santysisi

Hi 馃憢 First of all, thank you for the great work on PHPStan and the Symfony extension!

We are working on integrating result cache in our project to speed up analysis times. However, we noticed that the cache is invalidated very frequently, which reduces its effectiveness in most of our development workflows.

After some investigation, we identified the source of this behavior to be the feature added in this PR

We completely understand the value of this feature, it ensures the cache is invalidated when DI definitions change, which is especially important for production builds or CI pipelines to guarantee correctness.

However, in our development setup, this behavior is too aggressive. The DI container in our Symfony app changes very frequently , and as a result, the cache is invalidated most of the time. This defeats the purpose of caching during active development.

We suggest introducing a new configuration option (which was once discussed in the original PR but never merged):

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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