phpstan-symfony
phpstan-symfony copied to clipboard
Add generics to cache item
Add type of cached items to improve type checking
Hi @ossinkine, adding generics with a phpstan stub is always tricky, because if someone use both psalm and phpstan
writes CacheItemInterface<Foo>
psalm will report an error because it's not a generic.
Best would be to do the PR directly on php-fig/cache and symfony/symfony repository. (Symfony now accepts to add generics)
Or at least to provide the same PR on psalm-plugin https://github.com/psalm/psalm-plugin-symfony/tree/master/src/Stubs/common/Contracts/Cache