Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Redis6Proxy incompatible with phpredis #57884

Closed
@111ypuk

Description

@111ypuk

Symfony version(s) affected

7.1

Description

After update phpredis/phpredis@6ea5b3e

Get error:

 Declaration of Symfony\Component\Cache\Traits\Redis6Proxy::hSet($key, $member, $value): Redis|int|false must be compatible with Redis::hSet(string $key, mixed ...$fields_and_vals): Redis|int|false {"file":"/app/vendor/symfony/cache/Traits/Redis6Proxy.php","exception":"[object] (ErrorException(code: 0): Declaration of Symfony\\Component\\Cache\\Traits\\Redis6Proxy::hSet($key, $member, $value): Redis|int|false must be compatible with Redis::hSet(string $key, mixed ...$fields_and_vals): Redis|int|false at /app/vendor/symfony/cache/Traits/Redis6Proxy.php:519)"

How to reproduce

Create a symfony web project and inside it a Dockerfile with a php container which installs redis
...
FROM php:8.3.8-cli-alpine
...
RUN apk add --no-cache lz4-dev
&& mkdir /tmp/phpredis
&& cd /tmp/phpredis
&& git clone --recurse-submodules https://github.com/phpredis/phpredis "php-redis"
&& cd php-redis
&& phpize
&& ./configure --enable-redis-igbinary --enable-redis-lz4 --with-liblz4=/usr/lib
&& make
&& make install
&& make clean
&& docker-php-ext-enable redis
&& rm -rf /tmp/phpredis
...

Run the docker container and open the website

Possible Solution

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions