Skip to content

DOC-7346 Add a Predis BITRANGEINTARRAY example to the bitmaps page - #4663

Merged
andy-stark-redis merged 1 commit into
mainfrom
DOC-7346-predis-bitrangeintarray
Nov 25, 2026
Merged

andy-stark-redis merged 1 commit into
mainfrom
DOC-7346-predis-bitrangeintarray

Conversation

@andy-stark-redis

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

Copy link
Copy Markdown
Contributor

Adds a bitrangeintarray step to the PHP bitmap_tutorial example and wraps the BITRANGEINTARRAY redis-cli block on the bitmaps page in a clients-example shortcode limited to PHP. The prompt prefix in the block changes from redis> to > to match the rest of the page.

Run-verified with the example harness on redis:8.12-rc2 (reports 8.11.241) against Predis v3.8.0. The whole DtBitmapTest passes, and the new step prints [1,7,9,30], [28,29,31], [1,7], [9,30], [1,7], [9], matching the redis-cli block. bitmap-default-roaring is no again afterwards.

Not built with Hugo: the shortcode shape copies the neighboring steps.

Parked #4527 wraps the same block for Python and Go, so whichever merges second needs a lang_filter and prompt-prefix merge. run.sh has no bitmap_tutorial entry; I ran the check with a temporary mapping line and did not commit it.

🤖 Generated with Claude Code


Note

Low Risk
Documentation and an executable example test only; no production code or runtime behavior changes.

Overview
Extends the BITRANGEINTARRAY section on the bitmaps doc so the embedded clients-example also shows PHP alongside Python and Go (lang_filter updated to Python, Go, PHP).

Adds a matching bitrangeintarray step to DtBitmapTest.php: enable Roaring, populate members, exercise full-range listing, ZEROS, BIT/BYTE ranges, and LIMIT pagination via Predis, with assertions aligned to the redis-cli block and teardown that resets config.

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

@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

DOC-7346

@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Redis Memory

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

Memory updated at 72e4931

@github-actions

Copy link
Copy Markdown
Contributor

@dwdougherty dwdougherty left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Adds a `bitrangeintarray` step to the PHP `bitmap_tutorial` file and
wraps the BITRANGEINTARRAY redis-cli block in bitmaps.md in a
`clients-example` shortcode with `lang_filter="PHP"`. The prompt prefix
in the block changes from `redis>` to `>` to match the rest of the page.

Run-verified on redis:8.12-rc2 (reports 8.11.241) against Predis v3.8.0.
Outputs match the redis-cli block: [1,7,9,30], [28,29,31], [1,7],
[9,30], [1,7], [9]. The `$index` argument is the BYTE/BIT unit: Predis
upper-cases arg 4 and appends it as-is (BITRANGEINTARRAY.php at v3.8.0).

Learned:
- The PHP step runs CONFIG SET bitmap-default-roaring yes, as the
  redis-cli block does, and resets it to `no` in REMOVE code. The build
  strips REMOVE blocks, so the reset only protects the harness.
- build/example-test-harness/run.sh has no `bitmap_tutorial` entry at
  all, so `./run.sh bitmap_tutorial php` reports "SKIP (no source)". I
  ran it with a temporary `bitmap_tutorial:php` line pointing at
  local_examples/tmp/DtBitmapTest.php and did not commit it, to stay in
  scope. The parked #4527 also notes the missing mapping.
- Not Hugo-built: the shortcode shape copies the neighboring steps.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@andy-stark-redis
andy-stark-redis force-pushed the DOC-7346-predis-bitrangeintarray branch from 4a90338 to 72e4931 Compare November 25, 2026 09:43
@andy-stark-redis
andy-stark-redis merged commit d59f3db into main Nov 25, 2026
117 checks passed
@andy-stark-redis
andy-stark-redis deleted the DOC-7346-predis-bitrangeintarray branch November 25, 2026 09:55
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