Skip to content

Result cache is not invalidated after DI container dump #255

Closed
@Wirone

Description

@Wirone

Imagine scenario:

  • With bin/console cache:clear you dump DI container
  • In code you use $container->get('foo');
  • PHPStan reports Service "foo" is not registered in the container
  • You fix DI definition by adding foo service
  • cache:clear again, so DI definition contains foo service
  • Because of result cache PHPStan reports errors even though DI container definition has changed and service is registered

Expected result: refreshing DI container invalidates result cache for files that uses DI (have errors reported by Symfony extension).

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