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

Deprecate methods deprecated in Redis and add their replacements to phpredis where they're missing or not accepting required arguments #2441

Open
13 tasks
kkmuffme opened this issue Feb 10, 2024 · 2 comments

Comments

@kkmuffme
Copy link

kkmuffme commented Feb 10, 2024

Redis deprecated various methods that should also be deprected in phpredis.
Data taken from https://redis.io/commands.json

=> BLMOVE does not have documentation yet for phpredis

=> docs only to remove "old format" and document "new format" https://redis.io/commands/client-kill/

=> the replacements aren't documented in phpredis yet

=> see 3)

=> the function should be deprecated and SET documented for this use case

=> the function should be deprecated and HSET documented for this use case

=> function should be deprecated and documentation updated with an example for set/pset

=> LMOVE isn't documented in phpredis yet

=> deprecated method and remove from docs, the "nx" behavior is already sufficiently documented in the replacement https://github.com/phpredis/phpredis?tab=readme-ov-file#set

=> the replacement isn't documented in phpredis yet

=> the replacement https://github.com/phpredis/phpredis?tab=readme-ov-file#zrange doesn't currently support the arguments needed or are only the docs outdated?

=> see 11)

=> see 11)

@michael-grunder
Copy link
Member

Thanks for the report.

I'm not sure how aggressive we should be in terms of the deprecations as many people are still using old versions of Redis. I wouldn't want to break people's code if we don't need to.

Also can you clarify the CLIENT KILL deprecation. I'm probably missing something obvious but it doesn't seem deprecated to me. 😄

@kkmuffme
Copy link
Author

I'm not sure how aggressive we should be in terms of the deprecations as many people are still using old versions of Redis

As a first step, I would suggest to only update the docs with clear @deprecated tags for those functions and ensure their replacement is documented, to ensure people who do not use phpredis yet, won't use any of these deprecated functions.

Additionally the stubs phpdoc should get a @deprecated tag added, so static analysis tools will pick up on that, to allow for a gradual transition from deprecated functions.

Since Redis itself has only marked it deprecated but not actually deprecated, I think this is sufficient to ensure consistency between Redis and phpredis docs and awareness that these functions will eventually be deprecated.

Also can you clarify the CLIENT KILL deprecation. I'm probably missing something obvious but it doesn't seem deprecated to me.

Yeah sorry that description was a bit wonky. Fixed now:

=> docs only to remove "old format" and document "new format" https://redis.io/commands/client-kill/

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