Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get value after incr with SERIALIZER_MSGPACK #2377

Open
2 tasks done
hellobbq opened this issue Sep 6, 2023 · 0 comments
Open
2 tasks done

get value after incr with SERIALIZER_MSGPACK #2377

hellobbq opened this issue Sep 6, 2023 · 0 comments

Comments

@hellobbq
Copy link

hellobbq commented Sep 6, 2023

I'm seeing this behaviour on

  • OS: debian12
  • Redis: 7.2
  • PHP: 8.2
  • phpredis: 6.0.0RC2 or 5.3.7

Steps to reproduce, backtrace or example script

echo '<pre>';
$redis = new Redis();
$redis->connect('/path/redis.sock');

$redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_NONE);
$redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_PHP);
$redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_IGBINARY);
$redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_JSON);
$redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_MSGPACK);

$key = 'incr_int';
var_dump($redis->del($key));
var_dump($redis->incr($key));
var_dump($redis->get($key));

Actual behaviour

redis->get output:

  • Redis::SERIALIZER_NONE : string(1) "1"
  • Redis::SERIALIZER_PHP : string(1) "1"
  • Redis::SERIALIZER_JSON : int(1)
  • Redis::SERIALIZER_IGBINARY : string(1) "1"
  • Redis::SERIALIZER_MSGPACK : int(49)

Expected behaviour

type or value sholud be consistent

I've checked

  • There is no similar issue from other users
  • Issue isn't fixed in develop branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants