Remove Redis signatures from functionMap and rely solely on phpstorm-stubs#4055
Remove Redis signatures from functionMap and rely solely on phpstorm-stubs#4055ondrejmirtes wants to merge 1 commit into2.1.xfrom
Conversation
|
I closed my PR, because it will not be merged anyway. Now I'm checking that reflection test. But where is this from? (There are many issues like this) /**
* @param string $key
- * @param int $min
- * @param int $max
- * @param int $options
- * @param int $limit
- * @return array
+ * @param string $min
+ * @param string $max
+ * @param array|null $options
+ * @return array|bool|RedisCluster
*/
- function zRevRangeByLex(string $key, string $min, string $max, array|null $options = null, mixed $limit): array|bool|RedisCluster'
+ function zRevRangeByLex(string $key, string $min, string $max, array|null $options = null): array|bool|RedisCluster'Here is from phpstorm stub file which was recently updated JetBrains/phpstorm-stubs#1750 /**
* @param string $key
* @param string $min
* @param string $max
* @param null|array $options
*
* @return RedisCluster|bool|array
* @throws RedisClusterException
* @see zRangeByLex()
*
* @link https://redis.io/commands/zrevrangebylex
*/
public function zRevRangeByLex(string $key, string $min, string $max, ?array $options = null): RedisCluster|bool|array {}There are few phpdocs issues but function signatures are correct. |
|
Yeah, that's expected. The new ( |
|
I don't think it will be possible to rely on phpstorm-stubs for redis because we're using |
|
There are way too much changes since RedisCluster stubs are outdated here. I sent PR for this before, but it was hard to review. Anyway I noticed these issues with latest phpstan Method RedisCluster::rawcommand() invoked with 2 parameters, 3 required
Method RedisCluster::info() invoked with 2 parameters, 0-1 required. In most of signatures is missing new |
I recommand to reopen https://github.com/phpstan/phpstan-src/pull/4045/files but with smaller PR, you could
And if the fix existing definition is still to big you can split into smaller BR, maybe
Or limiting PR at 5-10 functions signatures fixes |
No description provided.