{{ message }}
Repository navigation
docs(filters): document search filter family - #2338
Merged
Merged
Conversation
Adds Start/End/WordStartSearchFilter (ORM+ODM, #8328/#8319) and the FreeTextQueryFilter per-property filter map (#8257) to core/doctrine-filters.md, cross-referenced from the SearchFilter strategy migration table. Fills in the Laravel StartSearchFilter and EndSearchFilter bullets in laravel/filters.md with a working example and notes there is no Eloquent WordStartSearchFilter.
soyuka
force-pushed
the
docs/search-filter-family
branch
from
September 13, 2026 06:31
f359e65 to
9eb118d
Compare
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.

Summary
StartSearchFilter,EndSearchFilter, andWordStartSearchFilter(core #8328, #8319) for both Doctrine ORM and MongoDB ODM incore/doctrine-filters.md, including the#[QueryParameter]declaration, the exactLIKE/regex pattern each generates, and the case-sensitivity default for each backend.SearchFilter-> modern filter migration table row that previously mappedpartial, start, end, word_startstrategies all ontoPartialSearchFilter, into distinct rows pointing at the new dedicated filters.FreeTextQueryFilterper-propertyarray<string, FilterInterface>constructor argument (core #8257), with a worked example (partial match ontitle, exact match onisbn) and the behavior for a property missing from the map.laravel/filters.mdbullets forStartSearchFilter/EndSearchFilterwith a working example, and notes there is no Eloquent equivalent ofWordStartSearchFilter.StartSearchFilter,EndSearchFilter, andWordStartSearchFilterto the summary filter list incore/filters.md, matching the existingExactFilter/PartialSearchFilterentry shape and cross-linking to the newcore/doctrine-filters.mdsections.Stacked on #2335
This branch is based on
docs/backport-4.4-features(tipfaba151f7b34ac52bee024bbb90b4dd1074cf39e), which already rewrites large parts ofcore/doctrine-filters.mdand adds ~10 lines tocore/filters.md. Please merge #2335 first, then rebase/merge this on top of it — basing onupstream/4.4directly would conflict.Verified against
ApiPlatform\Doctrine\Orm\Filter\{Start,End,WordStart}SearchFilterandApiPlatform\Doctrine\Odm\Filter\{Start,End,WordStart}SearchFilteratupstream/4.4in api-platform/core.ApiPlatform\Laravel\Eloquent\Filter\{Start,End}SearchFilterat the same ref — confirmed noWordStartSearchFilterexists undersrc/Laravel/Eloquent/Filter/.ApiPlatform\Doctrine\{Orm,Odm}\Filter\FreeTextQueryFilterconstructor (FilterInterface|array $filter) at the same ref.Key findings baked into the docs:
Start/End/WordStart) default to case-insensitive (LOWER()comparison); ODM defaults to case-sensitive (regex without theiflag) — opposite defaults, both configurable via thecaseSensitiveconstructor argument.WordStartSearchFilterrecognizes a word boundary only on a literal ASCII space (LIKE 'value%' OR LIKE '% value%'); ODM recognizes any whitespace character (\s) via(^value|\svalue).Start/EndSearchFilteruseQueryPropertyTraitonly (noNestedPropertyTrait), so unlikePartialSearchFilterthey do not support dot-notation relation filtering.Out of scope / left for other agents
SearchFilterdeprecation> [!WARNING]callout, and theRangeFilter/ComparisonFilterwording elsewhere incore/filters.md, were left untouched per instructions — owned by other agents.core/doctrine-filters.md, predating this change. Deliberately left as-is — it's cosmetic and repeated across many examples, so it deserves its own PR rather than riding along in this one.