Closed
Description
Expected behaviour
It would be good to have xinfo return the data as assocative array or provide a helper function to access its data better.
I'm seeing this behaviour on
- OS: MACOS
- Redis: 5.0.3
- PHP: 7.3
- phpredis: 4.3.0
Steps to reproduce, backtrace or example script
var_dump($this->connection->xinfo('GROUPS', 'my_stream');
array(1) {
[0]=>
array(8) {
[0]=>
string(4) "name"
[1]=>
string(7) "group-name"
[2]=>
string(9) "consumers"
[3]=>
int(0)
[4]=>
string(7) "pending"
[5]=>
int(0)
[6]=>
string(17) "last-delivered-id"
[7]=>
string(3) "0-0"
}
}
I would expect something like:
array(1) {
['group-name']=>
array(3) {
['consumers']=> int(0),
['pending'] => int(0)
['last-delivered-id']=> string(3) "0-0"
}
}
So its possible to access its data with: $infos['group-name']['last-delivered-id']
I've checked
- There is no similar issue from other users
- Issue isn't fixed in
develop
branch