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

RedisCluster::SERIALIZER_NONE is gone with v6.0 #2384

Open
1 of 2 tasks
boesing opened this issue Sep 13, 2023 · 2 comments
Open
1 of 2 tasks

RedisCluster::SERIALIZER_NONE is gone with v6.0 #2384

boesing opened this issue Sep 13, 2023 · 2 comments

Comments

@boesing
Copy link

boesing commented Sep 13, 2023

Expected behaviour

var_dump(RedisCluster::SERIALIZER_NONE); // int(0)

Actual behaviour

PHP Warning:  Uncaught Error: Undefined constant RedisCluster::SERIALIZER_NONE in php shell code:1

I'm seeing this behaviour on

  • OS: MacOS
  • Redis: ❌
  • PHP: 8.2
  • phpredis: 6.0

Steps to reproduce, backtrace or example script

var_dump(Redis::SERIALIZER_NONE); // int(0)

I've checked

  • There is no similar issue from other users
  • Issue isn't fixed in develop branch
@boesing boesing changed the title Redis::SERIALIZER_NONE is gone with v6.0 RedisCluster::SERIALIZER_NONE is gone with v6.0 Sep 13, 2023
@boesing
Copy link
Author

boesing commented Sep 13, 2023

In v5 and prior, the constants were available via all implementations.
Is that change intended and do you recommend using Redis::* constants only?

@L00Cyph3r
Copy link

L00Cyph3r commented Sep 20, 2023

It seems that #2259 changed this behaviour. We were surprised by fatal errors after upgrading to v6.0.0.
Was this breaking change forgotten in the release notes, or did I miss something? It would be great if there was a warning and/or upgrade guide for other users.

Quick fix indeed seems to be to use the Redis:: constants if available where currently RedisCluster:: is used. Only a few remain that are cluster-specific (see PR for details of changes).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants