Skip to content

Filter improvments#135

Merged
clementtalleu merged 4 commits into
clementtalleu:mainfrom
guillaumedelre:feature/search-filter-improvment
May 5, 2026
Merged

Filter improvments#135
clementtalleu merged 4 commits into
clementtalleu:mainfrom
guillaumedelre:feature/search-filter-improvment

Conversation

@guillaumedelre
Copy link
Copy Markdown
Contributor

No description provided.

Add DateFilter supporting after/before/strictly_after/strictly_before
operators and exact date match via range query on a new NUMERIC alias
created for DateTime fields in HASH format.

Add RangeFilter supporting gt/gte/lt/lte/between operators for numeric
fields.

Normalize BooleanFilter to accept true/false/1/0 string values.

Extend count() in RedisClient and AbstractObjectRepository to support
range filters so paginator totalItems stays consistent.
…ions

Introduces ExistsFilter supporting ?exists[field]=true/false (and 1/0).
Wires raw negation queries (-@field:{null} / @field:{null}) through a new
additionalRangeFilters param added to findBy*, count, and RedisPaginator.
… system

Override getSchema() to return enum: [ASC, DESC, asc, desc], which lets
ParameterValidationResourceMetadataCollectionFactory auto-derive a Choice
constraint. ParameterValidatorProvider then rejects invalid directions with
422 before the filter runs. Remove the redundant in_array direction checks
and the null-parameter guard.
@codecov-commenter
Copy link
Copy Markdown

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

Codecov Report

❌ Patch coverage is 75.00000% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.64%. Comparing base (3d58f10) to head (9e9e6ac).

Files with missing lines Patch % Lines
src/ApiPlatform/Filters/ExistsFilter.php 50.00% 12 Missing ⚠️
src/Client/RedisClient.php 0.00% 8 Missing ⚠️
src/ApiPlatform/Filters/DateFilter.php 85.00% 3 Missing ⚠️
src/ApiPlatform/Filters/OrderFilter.php 25.00% 3 Missing ⚠️
src/ApiPlatform/Filters/RangeFilter.php 94.44% 1 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #135      +/-   ##
============================================
+ Coverage     73.52%   73.64%   +0.11%     
- Complexity      847      881      +34     
============================================
  Files            65       68       +3     
  Lines          1953     2030      +77     
============================================
+ Hits           1436     1495      +59     
- Misses          517      535      +18     

☔ 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.

@clementtalleu clementtalleu merged commit fa011ed 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