Skip to content

PHPRedis getClient only for v6+ #59

Open
@inpresif

Description

@inpresif

Unfortunately, as a windows user for local dev there's no such version yet (5.3 or so is highest).

This means that the line:
$client = $clientFacade->getClient(new \Redis(['host', 6379])); will not work, as the construct expects 0 values.

Tried this:

$redis = new Redis();
$redis->connect('127.0.0.1', 6379);
$client = $clientFacade->getClient(new Redis($redis));

but that resolves to an error:

<br />
<b>Fatal error</b>:  Uncaught RedisException: Redis server went away in C:\Users\test.dev\redis\redisearch-macfja\vendor\macfja\redisearch\src\Redis\Client\PhpredisClient.php:53
Stack trace:
#0 C:\Users\test.dev\redis\redisearch-macfja\vendor\macfja\redisearch\src\Redis\Client\PhpredisClient.php(53): Redis-&gt;getOption(8)
#1 C:\Users\test.dev\redis\redisearch-macfja\vendor\macfja\redisearch\src\IndexBuilder.php(228): MacFJA\RediSearch\Redis\Client\PhpredisClient-&gt;execute(Object(MacFJA\RediSearch\Redis\Command\Create))
#2 C:\Users\test.dev\redis\redisearch-macfja\index.php(32): MacFJA\RediSearch\IndexBuilder-&gt;create(Object(MacFJA\RediSearch\Redis\Client\PhpredisClient))
#3 {main}
  thrown in <b>C:\Users\test.dev\redis\redisearch-macfja\vendor\macfja\redisearch\src\Redis\Client\PhpredisClient.php</b> on line <b>53</b><br />

Any tips?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions