oerdnj / deb.sury.org

Public bugreports for anything ppa:ondrej/*
821 stars 25 forks source link

php-redis with msgpack serializer support #999

Open golgote opened 5 years ago

golgote commented 5 years ago

In 7.2 at least, it seems that php-redis cannot make use of the msgpack serializer although php-msgpack is installed (and works well with php-memcached), I get an error when I try to use it :

php -r 'var_dump(Redis::SERIALIZER_IGBINARY);'
int(2)
php -r 'var_dump(Redis::SERIALIZER_MSGPACK);'
PHP Fatal error:  Uncaught Error: Undefined class constant 'SERIALIZER_MSGPACK' in Command line code:1

Would it be possible to add support for the msgpack serializer for redis since it is supported by the extension and msgpack is a common format when using redis (much more common than igbinary) ? There is a configure option for that --enable-redis-msgpack.

oerdnj commented 5 years ago

I am afraid there's no configure option for that:

PHP_ARG_ENABLE(redis-session, whether to enable sessions,
[  --disable-redis-session Disable session support], yes, no)

PHP_ARG_ENABLE(redis-igbinary, whether to enable igbinary serializer support,
[  --enable-redis-igbinary Enable igbinary serializer support], no, no)

PHP_ARG_ENABLE(redis-lzf, whether to enable lzf compression,
[  --enable-redis-lzf      Enable lzf compression support], no, no)

PHP_ARG_WITH(liblzf, use system liblzf,
[  --with-liblzf[=DIR]       Use system liblzf], no, no)

And the PR for that hasn't been merged into the redis yet: https://github.com/phpredis/phpredis/pull/1050

Please reopen when it actually make it the release?

jbelien commented 7 months ago

Hello @oerdnj, There is now support for REDIS_SERIALIZER_MSGPACK : https://github.com/phpredis/phpredis/pull/1530 Is it something that could still be added ? Thanks a lot.