Skip to content

feat: validate identifier indexing in generateSchema#136

Merged
clementtalleu merged 2 commits into
clementtalleu:mainfrom
guillaumedelre:feature/issue-104
May 5, 2026
Merged

feat: validate identifier indexing in generateSchema#136
clementtalleu merged 2 commits into
clementtalleu:mainfrom
guillaumedelre:feature/issue-104

Conversation

@guillaumedelre
Copy link
Copy Markdown
Contributor

@guillaumedelre guillaumedelre commented May 5, 2026

Ref: Always index ID
Ref: Add tests

Throw BadIdentifierConfigurationException when an #[Id] property has a type that cannot be indexed (array, resource, etc.) instead of silently skipping it.

Add FT.INFO support via getIndexInfo() on RedisClientInterface and both client implementations. Add integration tests that verify TAG and NUMERIC indexes on the identifier are searchable after generateSchema runs.

RedisClient: 64 unit tests covering all methods, error paths, criteria building
(TAG/NUMERIC/rangeFilters), pipeline, search/customSearch/searchLike branches,
dash-escaping, numberOfResults limit, getIndexInfo parsing

PredisClient: 65 unit tests mirroring RedisClient coverage, adapted for Predis
internals (executeRaw, __call dispatch, cursor-based scanKeys, searchLike non-array guard)

Integration: 16 tests against real Redis for scanKeys, discard, jsonGetProperty,
hSet/hget, jsonSet/jsonGet, expire/expireTime, hGetAllMultiple, jsonGetMultiple

Install predis/predis ^2.0||^3.0 as dev dependency (was declared but missing from lock)

Throw BadIdentifierConfigurationException when an #[Id] property has a
type that cannot be indexed (array, resource, etc.) instead of silently
skipping it.

Add FT.INFO support via getIndexInfo() on RedisClientInterface and both
client implementations. Add integration tests that verify TAG and NUMERIC
indexes on the identifier are searchable after generateSchema runs.
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 5, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.05%. Comparing base (fa011ed) to head (71c86fb).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@              Coverage Diff              @@
##               main     #136       +/-   ##
=============================================
+ Coverage     73.64%   88.05%   +14.40%     
- Complexity      881      896       +15     
=============================================
  Files            68       68               
  Lines          2030     2067       +37     
=============================================
+ Hits           1495     1820      +325     
+ Misses          535      247      -288     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…lient and PredisClient

- RedisClient: 64 unit tests covering all methods, error paths, criteria building
  (TAG/NUMERIC/rangeFilters), pipeline, search/customSearch/searchLike branches,
  dash-escaping, numberOfResults limit, getIndexInfo parsing
- PredisClient: 65 unit tests mirroring RedisClient coverage, adapted for Predis
  internals (executeRaw, __call dispatch, cursor-based scanKeys, searchLike non-array guard)
- Integration: 16 tests against real Redis for scanKeys, discard, jsonGetProperty,
  hSet/hget, jsonSet/jsonGet, expire/expireTime, hGetAllMultiple, jsonGetMultiple
- Install predis/predis ^2.0||^3.0 as dev dependency (was declared but missing from lock)
This was referenced May 5, 2026
@clementtalleu clementtalleu merged commit 514a6db into clementtalleu:main May 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants