Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Response of xinfo unaccessable format #1559

Copy link
Copy link
Closed
@alexander-schranz

Description

@alexander-schranz
Issue body actions

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

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.