Repository navigation
Add _or to filters - #319
Merged
TomHAnderson merged 1 commit intoOct 5, 2026
Merged
Conversation
A filter's _or is a list of branches, any of which a row matches. Each
branch is a filter whose own filters are all matched, of a
FilterBranch_<Type> type: the same filters less sort and sortPriority,
with an _or of its own. Collection filters and computed fields, with
their args, have it too.
- Filter\QueryBuilder's filter methods return their conditions rather
than adding them; apply() adds the top-level conditions one by one, so
a filter without _or builds the same DQL. A branch with no conditions
is 1 = 1, keeping the parameters other branches bound; _or: [] matches
nothing, as in: [] does.
- The filterDepth (default 3) and filterConditions (default 100) config
limit _or before any DQL is built, with a client error. Only
conditions inside _or are counted; 0 or null is unlimited.
- A field, alias or computed field named _or throws Exception\Metadata.
- A field given null, such as { name: null }, raised a PHP warning; it
is not applied, as a filter given null is not.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 14.1.x #319 +/- ##
============================================
Coverage 100.00% 100.00%
- Complexity 1276 1318 +42
============================================
Files 81 81
Lines 3490 3597 +107
============================================
+ Hits 3490 3597 +107 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
A filter's or is a list of branches, any of which a row matches. Each branch is a filter whose own filters are all matched, of a FilterBranch type: the same filters less sort and sortPriority, with an _or of its own. Collection filters and computed fields, with their args, have it too.