Sitelet https://github.com/phpredis/phpredis/issues/1168
Skip to content

Deprecation of non command sort helper methods #1168

Description

@michael-grunder

Phpredis provides four helper methods for sorting which do not actually map directly to Redis commands, but are instead all simplified ways to call SORT with various different options specified.

The methods in question are:

  • sortAsc
  • sortAscAlpha
  • sortDesc
  • sortDescAlpha

In going through the code and cleaning up some of the methods, I noticed that this creates quite a lot of code duplication, and everything that can be done with the above methods can also be done by calling sort directly.

In fact, until updating the code the helper methods could only handle a single GET pattern as it was taken as a string (redis supports multiple GET arguments).

I would like to deprecate the duplicated sort helper methods at some point in the near future. If this is problematic for people please comment here.

Mike

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions