ethanhann / redis-raw-php

MIT License
5 stars 8 forks source link

Change the order when password is set for redis #1

Closed harikt closed 2 years ago

harikt commented 2 years ago

I came across an erorr when the Redis password is set. Sample code is as

$redis = (new \Ehann\RedisRaw\PhpRedisAdapter())->connect(
    '127.0.0.1',
    '6379',
    0,
    'password'
);
When RedisException: NOAUTH Authentication required. in file /experiments/vendor/ethanhann/redis-raw/src/PhpRedisAdapter.php on line 23
Stack trace:
  1. RedisException->() /experiments/vendor/ethanhann/redis-raw/src/PhpRedisAdapter.php:23
  2. Redis->select() /experiments/vendor/ethanhann/redis-raw/src/PhpRedisAdapter.php:23