phpstan-symfony
phpstan-symfony copied to clipboard
Result cache is not invalidated after DI container dump
Imagine scenario:
- With
bin/console cache:clearyou 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
fooservice cache:clearagain, so DI definition containsfooservice- 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).