Repository navigation
DOC-7267 Give the Predis params a name and a type - #4510
Merged
Merged
Conversation
Contributor
Contributor
🧠 Redis MemoryFound 8 related items from repository history (3 new this commit):
Memory updated at 66aa8bf |
dwdougherty
approved these changes
Nov 9, 2026
165 php params in 90 command files stored their whole declaration in the name field, for example "?array $options = null" or "string $index = 'byte'", with the type Any. They now follow the form the other php params use: the name is the variable ($options, or ...$keys for a variadic) and the type is the declared PHP type. The 11 untyped parameters, such as $start = null on BITCOUNT, get mixed like the existing untyped ones, and defaults stay in the signature text only. Signatures, descriptions and returns are untouched. The JSON.SET $subcommand param, the 166th, is fixed by the Predis fpha change (#4509), which edits the same entry. Each of the 165 text values appeared verbatim in its own entry's signature, and the result was checked against the @method declarations in Predis 3.7.1 ClientInterface: 161 params equal the declared name and type at the same position, and the other 4 belong to methods with no @method line, so they follow the entry's own signature. Learned: a php param whose name contains a space or an equals sign is a declaration the extractor failed to split, split it into name and type rather than leaving it in the name field Constraint: a variadic php param keeps the leading ... on its name and the bare type, as INFO and PFCOUNT already do Gaps: 98 php entries still differ from their @method line in param types, mostly Any or string where the declaration says mixed, these were not in scope Ticket: DOC-7267 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
andy-stark-redis
force-pushed
the
DOC-7267-php-params
branch
from
November 9, 2026 14:54
80867df to
66aa8bf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
166 php params in 91 command files stored their whole declaration in the name field, for example
?array $options = nullorstring $index = 'byte', with the typeAny. They now follow the form the other php params use:$options), or...$keysfor a variadic.$start = nullon BITCOUNT, getmixed, like the existing untyped ones.Review notes
@methoddeclarations in Predis 3.7.1ClientInterface. 162 params equal the declared name and type at the same position. The other 4 belong to methods with no@methodline, so they follow the entry's own signature.=. The mergeddata/command-api-mapping.jsonequals a regeneration from the per-command files.@methodline in parameter types, mostlyAnyorstringwhere the declaration saysmixed(for example GEORADIUS's untyped parameters, or$subcommandon SCRIPT, COMMAND, CONFIG and SLOWLOG). Those params were already plain, so they were out of scope.content/develop/clientsignored (the full site only builds in CI). BITCOUNT now renders asbitcount($key: string, $start: mixed, $end: mixed, $index: string)and INFO asinfo(...$section: string). GEORADIUS shows$options: ?array, with its untyped params stillAnyfrom before.🤖 Generated with Claude Code
Note
Low Risk
Documentation and JSON metadata only; no runtime client or server behavior.
Overview
Normalizes Predis (
php) parameter metadata acrossdata/command-api-mapping.jsonand 91 per-command JSON files so entries match the pattern used by other params.Previously, 166 optional or typed parameters stored the full PHP fragment in
name(e.g.string $index = 'byte',?array $options = null) withtype: "Any". They now use variable-only names ($index,$options,...$keys) and concrete PHP types (string,?array,int,bool,mixedfor untyped params, etc.). Default values are not duplicated inname/type; they remain only in thesignaturestring.Signatures, descriptions, returns, and other client mappings are unchanged. The merged
command-api-mapping.jsonis kept in sync with the per-command files. Doc rendering can show typed params (e.g.bitcount($key: string, $start: mixed, …)instead of opaqueAnyslots for those fields).Reviewed by Cursor Bugbot for commit 66aa8bf. Bugbot is set up for automated code reviews on this repo. Configure here.