Skip to content

Remove Redis signatures from functionMap and rely solely on phpstorm-stubs #4055

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

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

Conversation

ondrejmirtes
Copy link
Member

No description provided.

@RobiNN1
Copy link

RobiNN1 commented Jun 13, 2025

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.

@ondrejmirtes
Copy link
Member Author

Yeah, that's expected. The new (+ lines in the diff) match exactly what's in phpstorm-stubs. Because I removed the old (wrong) signatures from functionMap.php.

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