Skip to content
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

Add generics to cache item #288

Open
wants to merge 1 commit into
base: 1.2.x
Choose a base branch
from

Conversation

ossinkine
Copy link
Contributor

Add type of cached items to improve type checking

@VincentLanglet
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants