Skip to content

DOC-7267 Add the fpha parameter to the Predis JSON.SET entry - #4509

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

andy-stark-redis merged 1 commit into
mainfrom
DOC-7267-predis-fpha

Conversation

@andy-stark-redis

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

Copy link
Copy Markdown
Contributor

Summary

Adds the fpha parameter to the Predis JSON.SET entry, the last known gap in the Predis data. Predis 3.7.1 declares jsonset(string $key, string $path, string $value, ?string $subcommand = null, ?string $fpha = null), and the entry stopped at $subcommand.

The entry's fourth parameter was also stored with the name ?string $subcommand = null and type Any. It's now $subcommand of type ?string.

Review notes

  • I built the command in Predis 3.7.1. Arguments key, path, value, null, fp16 produce JSON.SET key path value FPHA FP16. With xx and BF16 they produce XX FPHA BF16. fp8 throws UnexpectedValueException. The value is case-insensitive.
  • The two descriptions are mine, based on the command class.
  • One command file changes, plus the merged data file. The merged file equals a regeneration.
  • Not fixed: 166 other php params store their type and default in the name, for example ?array $options = null with type Any (GEORADIUS). That's a separate cleanup, and I'd check each against ClientInterface first.

🤖 Generated with Claude Code


Note

Low Risk
Documentation-only changes to command API mapping JSON; no runtime code paths.

Overview
Updates the Predis/PHP JSON.SET mapping so jsonset matches Predis 3.7.1: the signature gains optional $fpha, and the merged command-api-mapping.json is kept in sync via the per-command JSON.SET.json file.

The fourth argument is normalized from a malformed param name/type to $subcommand as ?string, with a short note that it accepts NX/XX. The new fifth param documents FPHA (BF16, FP16, FP32, FP64, case-insensitive).

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

Predis 3.7.1 declares jsonset(string $key, string $path, string $value, ?string $subcommand =
null, ?string $fpha = null) on ClientInterface, and the entry stopped at $subcommand. It now
lists $fpha. Its fourth parameter was also stored as the name "?string $subcommand = null" with
type Any, so it is now $subcommand of type ?string, like the other nullable parameters.

Checked by building the command: JSONSET with arguments key, path, value, null, fp16 produces
JSON.SET key path value FPHA FP16; with xx and BF16 it produces XX FPHA BF16; and fp8 throws
UnexpectedValueException listing bf16, fp16, fp32 and fp64. The value is case-insensitive.

Learned: Predis takes the NX or XX flag at argument position 4 and fpha at position 5, so fpha without a flag needs null in position 4
Gaps: 166 other php params store their type and default in the name (for example "?array $options = null" with type Any), not fixed here
Ticket: DOC-7267
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@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 5 related items from repository history (5 new this commit):

Memory updated at 4304922

@andy-stark-redis
andy-stark-redis requested a review from a team November 9, 2026 09:37
@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
andy-stark-redis added a commit that referenced this pull request 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 f949ab7 into main Nov 9, 2026
109 checks passed
@andy-stark-redis
andy-stark-redis deleted the DOC-7267-predis-fpha branch November 9, 2026 15:28
andy-stark-redis added a commit that referenced this pull request Nov 9, 2026
165 php params in 90 command files stored their whole declaration in the name field, such as "?array $options = null" with 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 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 #4509, which edits the same entry.

Each of the 165 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
Ticket: DOC-7267
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
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