docs: DateFilter has no ComparisonFilter replacement; document ChainFilter#2316
Open
soyuka wants to merge 1 commit into
Open
docs: DateFilter has no ComparisonFilter replacement; document ChainFilter#2316soyuka wants to merge 1 commit into
soyuka wants to merge 1 commit into
Conversation
…ilter Correct the guidance suggesting ComparisonFilter replaces DateFilter — ComparisonFilter does not replicate DateFilter's null management, Doctrine date-type binding, tolerant invalid-value handling, or inclusive/exclusive before/after vocabulary. DateFilter is a kept filter with no modern equivalent. Add a #7361 note wherever a legacy AbstractFilter (DateFilter/RangeFilter/ ExistsFilter) is shown inline in a QueryParameter: the cosmetic ManagerRegistry warmup ALERT, silenced via a service id or a ChainFilter. Document the new 4.4 ChainFilter (ORM + ODM) for composing several filters on a single parameter key, and update the boolean ExactFilter recipe for castToArray.
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.
What
Corrects filter-migration guidance and documents the new
ChainFilter.DateFilterhas no modern replacement. The docs suggested replacingDateFilterwithComparisonFilter(new ExactFilter()). That's wrong —ComparisonFilteronly does plaingt/gte/lt/lte/necomparisons and does not replicateDateFilter's per-property null management,\DateTime/\DateTimeImmutablebinding from the Doctrine column type, tolerant invalid/empty-value handling, or the inclusivebefore/aftervs exclusivestrictly_*vocabulary. Rewrote the Date Filter tip, the "Built-in Search Filters" list entry, and a misleadingcreatedAt/EventODM example. (RangeFilter→ComparisonFilter advice is left intact — correct for numeric ranges.)#7361 warmup ALERT note. Wherever a legacy
AbstractFilter-based filter (DateFilter,RangeFilter,ExistsFilter) is shown declared inline (new DateFilter()) in aQueryParameter, added a[!NOTE]: it logs a cosmeticManagerRegistry must be initialized before accessing it.ALERT at cache warmup (filtering still works); silence it via a service id or aChainFilter.New
## Chain Filtersection. Documents the 4.4ChainFilter(ORM + ODM) — composes several filters on one key, each self-selecting by value shape; canonicalExactFilter+DateFilterexample that keepsDateFilter's semantics and suppresses the #7361 ALERT.Boolean recipe updated for
castToArray: false(single param) — consistent with the OpenAPI parameter fix in core.Pairs with
ChainFilter, ORM + ODM) — this documents it. Should merge together / after.markdownlint clean on both changed files.