Skip to content

DOC-7267 Give the Predis params a name and a type - #4510

Merged
andy-stark-redis merged 1 commit into
mainfrom
DOC-7267-php-params
Nov 9, 2026
Merged

andy-stark-redis merged 1 commit into
mainfrom
DOC-7267-php-params

Conversation

@andy-stark-redis

@andy-stark-redis andy-stark-redis commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

166 php params in 91 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.
  • The type is the declared PHP type. The 11 untyped parameters, such as $start = null on BITCOUNT, get mixed, like the existing untyped ones.
  • Defaults stay in the signature text only. Signatures, descriptions and returns are untouched.

Review notes

  • Each of the 166 values appeared verbatim in its own entry's signature, so this splits what the extractor failed to split and doesn't introduce anything new.
  • I checked the result against the @method declarations in Predis 3.7.1 ClientInterface. 162 params equal the declared name and type at the same position. The other 4 belong to methods with no @method line, so they follow the entry's own signature.
  • No other client's key changes, and no php param name still contains a space or =. The merged data/command-api-mapping.json equals a regeneration from the per-command files.
  • Not fixed: 98 php entries still differ from their @method line in parameter types, mostly Any or string where the declaration says mixed (for example GEORADIUS's untyped parameters, or $subcommand on SCRIPT, COMMAND, CONFIG and SLOWLOG). Those params were already plain, so they were out of scope.
  • Built with content/develop/clients ignored (the full site only builds in CI). BITCOUNT now renders as bitcount($key: string, $start: mixed, $end: mixed, $index: string) and INFO as info(...$section: string). GEORADIUS shows $options: ?array, with its untyped params still Any from 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 across data/command-api-mapping.json and 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) with type: "Any". They now use variable-only names ($index, $options, ...$keys) and concrete PHP types (string, ?array, int, bool, mixed for untyped params, etc.). Default values are not duplicated in name/type; they remain only in the signature string.

Signatures, descriptions, returns, and other client mappings are unchanged. The merged command-api-mapping.json is kept in sync with the per-command files. Doc rendering can show typed params (e.g. bitcount($key: string, $start: mixed, …) instead of opaque Any slots for those fields).

Reviewed by Cursor Bugbot for commit 66aa8bf. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

DOC-7267

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Redis Memory

Found 8 related items from repository history (3 new this commit):

Memory updated at 66aa8bf

@andy-stark-redis
andy-stark-redis requested a review from a team November 9, 2026 09:47
@andy-stark-redis andy-stark-redis self-assigned this Nov 9, 2026
@andy-stark-redis andy-stark-redis added the clients Client library docs label 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
andy-stark-redis merged commit 25971a3 into main Nov 9, 2026
108 checks passed
@andy-stark-redis
andy-stark-redis deleted the DOC-7267-php-params branch November 9, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clients Client library docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants