-
Notifications
You must be signed in to change notification settings - Fork 96
Add generics to cache item #288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
f323b37
to
47b1bbc
Compare
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
7120655
to
931c6b5
Compare
As this is about adding generic types for the PSR Cache interface, which is not specific to Symfony, I'm not sure this should be done by the phpstan-symfony extension (and this should probably be discussed with FIG first to try to get them upstream)
Agreed.
Add type of cached items to improve type checking