Fix method annotations in ClientInterface for lpush and similar#1160
Fix method annotations in ClientInterface for lpush and similar#1160kwidua wants to merge 1 commit into
Conversation
|
@vladvildanov What the correct annotation for this? |
|
@tillkruss Are you talking about broken CI or...? |
No, I mean |
|
@tillkruss In my opinion, we should only support |
|
@kwidua What do you think about just using |
|
What about everyone that has used array before, for them the psalm checks would fail then? |
I'm not sure if |
|
@tillkruss Exactly, it means that it could be P.S New commands support includes only |
|
I agree with @vladvildanov here, @kwidua. We can update the signatures to If this is causing issues with your linters right now, feel free to update the test suite to resolve it in the |
|
@tillkruss sorry for the delayed reply. If you prefer |
No worries.
Yes, I meant if any of the tests in the Predis suite need to be adjusted to please your local or CI linters, you can to adjust the code in |
edaba2b to
fa40521
Compare
|
@szepeviktor: What's the correct notation to support |
|
@tillkruss I am sorry. That is called bad design. |
| * @method int setrange(string $key, $offset, $value) | ||
| * @method int strlen(string $key) | ||
| * @method int hdel(string $key, array $fields) | ||
| * @method int hdel(string $key, array|string ...$fields) |
There was a problem hiding this comment.
@kwidua @szepeviktor: Wouldn't the correct notation be this?
hdel(string $key, array|string $fields, string ...$extra_fields)There was a problem hiding this comment.
No. Variable-length argument lists cannot be in union with something else.
|
Any updates on this? Or any help needed? |
Feel free to open a new PR targeting |
This integrates and extends changes from predis#1160 by @kwidua
This integrates and extends changes from predis#1160 by @kwidua
|
@tillkruss done in #1570 Would you be OK to get the same changes for the v2.x branch too? |
This integrates and extends changes from predis#1160 by @kwidua
This integrates and extends changes from predis#1160 by @kwidua
This integrates and extends changes from predis#1160 by @kwidua
I adjusted the second parameter of
lpushand other methods where this also applies to bearray|string ...$valuesinstead of justarray $values, in order to fix psalm warning.Fixes #1146