Repository navigation
DOC-7267 Tidy the Predis param names and types - #4511
Merged
Merged
Conversation
Contributor
Contributor
🧠 Redis MemoryFound 7 related items from repository history (2 new this commit):
Memory updated at 446be04 |
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]>
A follow-up to the php param cleanup. Three differences between php params and their own signatures, found by comparing every php entry against the Predis 3.7.1 @method declarations. 77 command files change, only param name and type fields. Variadic params: 52 params whose signature has ...$name stored the name without the dots, such as $keys for string ...$keys, while INFO and PFCOUNT use ...$keys. They now carry the dots. 32 of them also ended the type with an ellipsis ("string ..."), which would show the ellipsis twice, so the type is the bare string. Untyped params: 47 params typed Any, all untyped in the signature, are mixed like the other untyped ones. Signatures, descriptions and returns are unchanged. After the change the param names of all 347 entries whose signature equals its @method line are identical to the declaration, and no php param has type Any. Learned: a php variadic keeps the dots on its name and the bare type, a module command keeps a plain name and a type ending in an ellipsis, these are two conventions in one file set Constraint: only touch a php param type when it is Any or repeats the ellipsis, a concrete type that is more specific than the declaration (string where Predis leaves $subcommand untyped) is information Gaps: 31 params still say string where the declaration is untyped, kept on purpose Gaps: 14 module-command variadics (CMS, TOPK, TDIGEST and similar) keep the plain name with a type ending in an ellipsis, a different convention that was not unified Ticket: DOC-7267 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
andy-stark-redis
force-pushed
the
DOC-7267-php-types
branch
from
November 9, 2026 14:54
dff7d1d to
446be04
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
A follow-up to #4510. I compared every php entry against the Predis 3.7.1
@methoddeclarations and fixed the three differences that are mechanical. 77 command files change, only paramnameandtypefields, plus the merged data file....$namestored the name without the dots ($keysforstring ...$keys), while INFO and PFCOUNT use...$keys. They now carry the dots.string ...), which would show it twice, so the type is the barestring.Any, all untyped in the signature, are nowmixed, like the other untyped ones.Review notes
mainincludes that PR's changes until DOC-7267 Give the Predis params a name and a type #4510 merges. Please merge DOC-7267 Give the Predis params a name and a type #4510 first.@methodline are identical to the declaration, and no php param has typeAny. No other client's key changes, and the merged file equals a regeneration.content/develop/clientsignored (the full site only builds in CI). TOUCH renders astouch($keyOrKeys: string[]|string, ...$keys: string), SUBSCRIBE assubscribe(...$channels: string), and GEORADIUS showsmixedfor its untyped params.stringwhere Predis leaves the param untyped (for example$subcommandon COMMAND, SCRIPT and CONFIG). That's more specific than the declaration, so I treated it as information.🤖 Generated with Claude Code
Note
Low Risk
Documentation/data-only edits to PHP mapping metadata; no application or client library code changes.
Overview
Aligns Predis (
php) parameter metadata indata/command-api-mapping/(and the mergedcommand-api-mapping.json) with Predis 3.7.1@methoddeclarations. Onlynameandtypefields change across ~77 command files; signatures, returns, and other clients are untouched.Variadic parameters now use names like
...$username/...$keysinstead of plain$username/$keys, matching how signatures and other commands (e.g. INFO) already document variadics. Where types had a trailing ellipsis (string ...,...), they are normalized to a single base type (string, or empty string for fully untyped variadic args).Optional/untyped parameters shed embedded defaults from the
namefield (e.g.?array $options = null→ name$options, type?array), and the former catch-allAnytype is replaced withmixed(or more specific types where the signature implies them, such asint,bool,?string).This is a follow-up to prior Predis mapping work (#4510); it improves how generated docs render PHP call signatures and does not change runtime client behavior.
Reviewed by Cursor Bugbot for commit 446be04. Bugbot is set up for automated code reviews on this repo. Configure here.