docs(filters): present-tense 5.0 filter changes - #2332
Merged
Conversation
soyuka
force-pushed
the
docs/filters-5.0-present-tense
branch
from
September 13, 2026 07:50
e80481d to
9a8f31e
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
The 5.0 filter docs still spoke about
main(5.0) in the future tense and never documented whatactually shipped in api-platform/core#8351 (
d37a75379). This PR alignscore/filters.md,core/doctrine-filters.md, andcore/jsonapi.mdwith the shipped code.ComparisonFilter [between]is real: documented as a first-class operator with a worked exampleand its generated SQL, replacing the "In 4.4 there is no dedicated between operator" / "in 5.0 it
also gains…" future-tense language. Also fixed a stale "five OpenAPI parameters" count (now six,
betweenincluded).RangeFilteris deprecated since 4.4, removed in 6.0 (not 5.0) — added a proper[!WARNING]deprecation callout on the
## Range Filtersection itself and synced thecore/filters.mdlistentry, which only said "legacy" before.
DateFilterandExistsFilterno longer extendAbstractFilter(standalone classes as of 5.0).Documented this as an internal rewrite only — URL syntax and behavior are unchanged; it only
matters for anyone who subclassed those filters directly.
PropertyAwareFilterInterface::getProperties()is now a real interface method (previously acommented-out
// TODO: 5.x uncomment method). Updated the custom-filter example under "Decoratea Doctrine filter using Symfony" so
SearchTextAndDateFilteractually implements the interfacewith both
setProperties()/getProperties(), and explained whatgetProperties()returns.core/jsonapi.md:use_iri_as_idalready defaults tofalseonmain(5.0) —Configuration.php:103-104(booleanNode('use_iri_as_id')->defaultFalse()). Rewrote the "willbecome the default in 5.x" line to describe the current default and pointed to
core/upgrade-guide.mdfor the migration (kept minimal — another agent owns that section).core/filters.md:enable_link_securitywas removed fromConfiguration.phpentirely in 5.0(feat!: remove deprecated APIs scheduled for 5.0 core#8367 — the 4.4 deprecation said "always enabled and will be removed in API
Platform 5.0"). Replaced the "enable it first" instructions for
ReadLinkParameterProviderwith aone-line note, matching the phrasing used for the same change in docs: remove config keys deleted in 5.0, document %param% resolution #2334
(
core/subresources.md).Verified against source (core
upstream/main@d37a75379, PR #8351)ComparisonFilter::OPERATOR_BETWEEN = 'between'— bothsrc/Doctrine/Orm/Filter/ComparisonFilter.phpand the ODM equivalent...(explode('..', $value, 2)), both bounds must beis_numeric(coerced to
int/float) —[between]does not acceptDateTimebounds, only combininggte/ltedoes.ExactFilter::apply()emitssprintf('%1$s.%2$s BETWEEN :%3$s_1 AND :%3$s_2', ...)when$context['operator'] === ComparisonFilter::OPERATOR_BETWEEN, or collapses to=when bothbounds are equal.
BETWEEN;ComparisonFilter::applyBetween()expands to agte/ltepair instead.RangeFilterdocblock:@deprecated since API Platform 4.4: ... This filter is removed in 6.0(both ORM and ODM
RangeFilter.php).DateFilter/ExistsFilterclass declarations changed fromextends AbstractFilter(4.4) tostandalone
final class ... implements FilterInterface, ..., PropertyAwareFilterInterface(main).PropertyAwareFilterInterface::getProperties(): ?arrayis a real abstract method onmain.Configuration.php:103—->booleanNode('use_iri_as_id')->defaultFalse().git grep -n enable_link_security upstream/main -- src/returns nothing (only a hit onupstream/4.4, where it's still present but deprecated).A note on commit 1 and pre-existing Prettier drift
core/doctrine-filters.mdandcore/filters.mdcame intomainvia #2316 already Prettier-dirty(
npx prettier@3.9.5 --checkfails onupstream/mainfor these two files before this PR). SincePrettier reformats the whole file rather than just touched hunks, commit 1
(
docs(filters): present-tense 5.0 filter changes) unavoidably carries that pre-existing reflowalongside the content changes — there wasn't a safe way to isolate a prettier-only commit ahead of
it without a history rewrite, which I avoided. The repo-wide
prettier --checkpasses clean as ofthis PR's tip.
Left untouched (per scope)
#[ApiFilter]"scheduled for removal in API Platform 5.0"[!WARNING]blocks atcore/doctrine-filters.md(Nested Properties / Enabling a Filter for All Properties sections) —another agent is fixing this wording on the
4.3branch; touching it here would conflict onmerge-up.
core/configuration.mdandcore/subresources.md— owned by another agent on this sameworkstream.
Test plan
npx prettier@3.9.5 --check "**/*.md" --prose-wrap alwayspasses repo-wide.