Skip to content

Not working with the Redis extension #46

@mnapoli

Description

@mnapoli

Maybe I'm doing it wrong but I cannot get this to work with the Redis extension. I'm running PHP 7, here is the list of warnings I'm getting:

Declaration of M6Web\Component\RedisMock\RedisMock_Redis_Adapter::scan(&$i_iterator, $str_pattern, $i_count) should be compatible with Redis::scan(&$i_iterator, $str_pattern = NULL, $i_count = NULL)
Declaration of M6Web\Component\RedisMock\RedisMock_Redis_Adapter::hscan($str_key, &$i_iterator, $str_pattern, $i_count) should be compatible with Redis::hscan($str_key, &$i_iterator, $str_pattern = NULL, $i_count = NULL)
Declaration of M6Web\Component\RedisMock\RedisMock_Redis_Adapter::zscan($str_key, &$i_iterator, $str_pattern, $i_count) should be compatible with Redis::zscan($str_key, &$i_iterator, $str_pattern = NULL, $i_count = NULL)
Declaration of M6Web\Component\RedisMock\RedisMock_Redis_Adapter::sscan($str_key, &$i_iterator, $str_pattern, $i_count) should be compatible with Redis::sscan($str_key, &$i_iterator, $str_pattern = NULL, $i_count = NULL)

I'm suspecting this is because the default value of internal/extension classes cannot be read (see Ocramius/ProxyManager#162 for example or also ParameterResolver.php#L97).

I'm wondering if it's sane to set a default value of null if we know there is a default value ($parameter->isOptional()) but we can't read it ($parameter->isDefaultValueAvailable())…

Has anyone managed to make this work with the Redis class of the Redis extension? (if so, which PHP version?)

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