You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(doctrine): add [between] to ComparisonFilter, deprecate RangeFilter
ComparisonFilter now supports the full range syntax: alongside gt/gte/lt/lte/ne
it parses [between]=X..Y, emitting a single BETWEEN clause on ORM (so the SQL
optimizer treats it as a bounded range; X..X collapses to =) and the native
gte/lte pair on ODM. ExactFilter gains the matching BETWEEN branch for the ORM
path; the branch only fires for the 'between' operator, leaving normal usage
untouched.
This gives ComparisonFilter full parity with RangeFilter, whose operators are
now a strict subset. RangeFilter is therefore redundant and reclassified from
"5.0 overlay survivor" to doomed: deprecated now, removed in 6.0, codemod
rewrites it to ComparisonFilter. The [between] URL syntax is preserved by
ComparisonFilter, so there is no consumer-facing breaking change. The
new-style FilteredRangeParameter fixtures (ORM + ODM) move to
ComparisonFilter, which then serves as the functional spec for [between].
Copy file name to clipboardExpand all lines: src/Doctrine/Odm/Filter/RangeFilter.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -108,7 +108,7 @@
108
108
* @author Lee Siong Chan <ahlee2326@me.com>
109
109
* @author Alan Poulain <contact@alanpoulain.eu>
110
110
*
111
-
* @deprecated since API Platform 4.4: extending {@see AbstractFilter} is deprecated. In 5.0 this filter is rewritten as a standalone overlay over {@see ComparisonFilter} (translating `[between]=X..Y` to `[gte]=X` + `[lte]=Y`, passing through `[gt]`/`[gte]`/`[lt]`/`[lte]`) — same class name, same URL syntax, drop-in. Declare it through a QueryParameter to migrate.
111
+
* @deprecated since API Platform 4.4: use {@see ComparisonFilter} instead, which now covers the full range syntax (`[gt]`/`[gte]`/`[lt]`/`[lte]` and `[between]=X..Y`). This filter is removed in 6.0; the upgrade codemod rewrites it to a QueryParameter declared with `ComparisonFilter`.
Copy file name to clipboardExpand all lines: src/Doctrine/Orm/Filter/RangeFilter.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -109,7 +109,7 @@
109
109
*
110
110
* @author Lee Siong Chan <ahlee2326@me.com>
111
111
*
112
-
* @deprecated since API Platform 4.4: extending {@see AbstractFilter} is deprecated. In 5.0 this filter is rewritten as a standalone overlay over {@see ComparisonFilter} (translating `[between]=X..Y` to `[gte]=X` + `[lte]=Y`, passing through `[gt]`/`[gte]`/`[lt]`/`[lte]`) — same class name, same URL syntax, drop-in. Declare it through a QueryParameter to migrate.
112
+
* @deprecated since API Platform 4.4: use {@see ComparisonFilter} instead, which now covers the full range syntax (`[gt]`/`[gte]`/`[lt]`/`[lte]` and `[between]=X..Y`). This filter is removed in 6.0; the upgrade codemod rewrites it to a QueryParameter declared with `ComparisonFilter`.
0 commit comments