Skip to content

docs(filters): fix migration guidance for kept filters#2313

Merged
soyuka merged 1 commit into
api-platform:4.3from
soyuka:docs/filters-4.4
Jul 12, 2026
Merged

docs(filters): fix migration guidance for kept filters#2313
soyuka merged 1 commit into
api-platform:4.3from
soyuka:docs/filters-4.4

Conversation

@soyuka

@soyuka soyuka commented Jul 12, 2026

Copy link
Copy Markdown
Member

What / why

The merged "Migrating from ApiFilter to QueryParameter" guide treated DateFilter, RangeFilter and ExistsFilter as doomed → ComparisonFilter. Verified against 4.4/main core: they are survivors — only the #[ApiFilter] / extends AbstractFilter declaration is deprecated, the class and URL syntax stay. The old examples were lossy/URL-breaking ([before]/[after][gte], [between][gte]/[lte]).

Changes

  • Migration table: Date/Range/Exists moved to "Kept — declare via QueryParameter, drop-in" rows.
  • Examples: DateFilterDateFilter, RangeFilterRangeFilter (URL unchanged), with a 5.0 ComparisonFilter forward-tip.
  • ComparisonFilter: dropped stale @experimental note (stable in 4.4). [between] is 5.0-only — 4.4 range stays gte+lte with a 5.0 forward-note.
  • Added a replaced vs kept explainer + named-args forward-compat tip.
  • core/filters.md: fixed "ComparisonFilter replaces DateFilter" claim.

markdownlint clean.

DateFilter, RangeFilter and ExistsFilter are kept (drop-in) — only the
#[ApiFilter] / AbstractFilter declaration is deprecated, not the class or
URL syntax. The migration table and examples wrongly rewrote them to
ComparisonFilter, which was lossy: it broke the [before]/[after] and
[between] URL syntax.

Also: ComparisonFilter's native [between] operator is 5.0-only, so 4.4
range queries stay gte+lte (with a 5.0 forward-note); drop the stale
@experimental note (ComparisonFilter is stable in 4.4); add a
survivors-vs-replaced split and a named-args forward-compat tip.
@soyuka soyuka merged commit ae6de00 into api-platform:4.3 Jul 12, 2026
2 of 3 checks passed
@soyuka soyuka deleted the docs/filters-4.4 branch July 12, 2026 12:59
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.

1 participant