feat: validate identifier indexing in generateSchema#136
Merged
clementtalleu merged 2 commits intoMay 5, 2026
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
…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 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.
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)