Expected behaviour
$r = new Redis();
$r->connect('redis', context: null);
# connected, return value true
Actual behaviour
$r = new Redis();
$r->connect('redis', context: null);
# TypeError Redis::connect(): Argument #7 ($context) must be of type array, null given.
I'm seeing this behaviour on
- OS: Linux
- Redis: 6.0.8
- PHP: 8.3.9
- phpredis: 6.0.2
Steps to reproduce, backtrace or example script
In this example I have a redis docker image running, accessible via the hostname redis
$r = new Redis();
$r->connect('redis', context: null);
The stubs say that context should be nullable:
|
public function connect(string $host, int $port = 6379, float $timeout = 0, ?string $persistent_id = null, |
|
int $retry_interval = 0, float $read_timeout = 0, ?array $context = null): bool; |
I've checked
Expected behaviour
Actual behaviour
I'm seeing this behaviour on
Steps to reproduce, backtrace or example script
In this example I have a redis docker image running, accessible via the hostname
redisThe stubs say that
contextshould be nullable:phpredis/redis.stub.php
Lines 853 to 854 in 7de29d5
I've checked
developbranch