Skip to content

feat(query-builder): enable complexity limits by default - #20259

Open
hamdyelbatal122 wants to merge 1 commit into
filamentphp:6.xfrom
hamdyelbatal122:feature/6.x/query-builder-complexity-limits
Open

feat(query-builder): enable complexity limits by default#20259
hamdyelbatal122 wants to merge 1 commit into
filamentphp:6.xfrom
hamdyelbatal122:feature/6.x/query-builder-complexity-limits

Conversation

@hamdyelbatal122

@hamdyelbatal122 hamdyelbatal122 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Fixes #20223

Description

This PR addresses issue #20223 by enabling query builder complexity limits by default in 6.x.

Currently, maxRules() and maxNestingDepth() default to null (unlimited), which can lead to high resource consumption if excessively large or deeply nested condition trees are submitted.

This sets the default limits to:

  • maxRules: 100 conditions
  • maxNestingDepth: 5 levels for "OR" groups

Documentation, test cases, and rule builder properties have been updated to align with these new defaults.

Visual changes

Functional changes

  • Code style has been fixed by running the composer cs command.
  • Changes have been tested to not break existing functionality.
  • Documentation is up-to-date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants