Skip to content

Missing Return Type Declarations: Redis::setex(), Redis::lInsert(), and Redis::keys() #2785

@andysnell

Description

@andysnell

The current "redis.stub.php" does not declare return types for the setex(), keys(), or lInsert() methods, which seems inconsistent with similar methods. For example, \Redis::psetex() \RedisCluster::setex(), and \RedisCluster::keys() all have their expected return types declared. Looking at "redis_arginfo.h", the only methods that have their arg info defined with the ZEND_BEGIN_ARG_INFO_EX macro are the class constructor, destructor, and the three aforementioned methods.

My first thought was that there is some kind of legacy "it's just got to be this way" reason, but I didn't find anything while searching through past issues and pull requests. I do see a few issues opened that seek to narrow types.

Assuming that these were oversights, would updating "redis.stub.php" with the exact return type as documented and regenerating the "redis_arginfo.h" and "redis_legacy_arginfo.h" files be considered a bug fix, or a breaking change that would need to wait to the next major version? If the later, is there a roadmap or timeline for v7? I'd be happy to open a PR to that effect, but understand the desire for caution when changing C files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions