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

Invalid redis types #7794

Closed
danog opened this issue Mar 16, 2022 · 2 comments
Closed

Invalid redis types #7794

danog opened this issue Mar 16, 2022 · 2 comments

Comments

@danog
Copy link
Collaborator

danog commented Mar 16, 2022

https://psalm.dev/r/6c1bda5975, which is weird since the callmap seems to contain the correct type.

@psalm-github-bot
Copy link

I found these snippets:

https://psalm.dev/r/6c1bda5975
<?php
$a = new \Redis;
/** @psalm-trace $result */
$result = $a->get('a');
Psalm output (using commit a9f4148):

INFO: Trace - 4:1 - $result: Redis|string

INFO: UnusedVariable - 4:1 - $result is never referenced or the value is not used

@AndrolGenhald
Copy link
Collaborator

A stub was added in #7614 that overrides the CallMap. This is actually the correct type, see here for discussion. If you want better types you can try making a plugin, I'd suggest using a template to track pipeline/multi state, but I've had trouble with using templates for state before so I'm not sure if that would work.

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

No branches or pull requests

2 participants