Skip to content

fix: allow nested DAL ID filters - #44

Merged
Soner (shyim) merged 3 commits into
mainfrom
codex/allow-nested-dal-id-filters
Aug 17, 2026
Merged

fix: allow nested DAL ID filters#44
Soner (shyim) merged 3 commits into
mainfrom
codex/allow-nested-dal-id-filters

Conversation

@keulinho

@keulinho Jonas Elfering (keulinho) commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Avoid false positives when an ID equality filter is nested in a compound DAL filter.

Details

  • inspect Criteria::addFilter() calls instead of every filter instantiation
  • report only a direct EqualsFilter or EqualsAnyFilter on id, which can be replaced with Criteria::setIds()
  • leave nested filters untouched because their composition changes the query semantics
  • add coverage for MultiFilter, NotFilter, and OrFilter nesting

Validation

  • vendor/bin/phpunit tests/Rule/NoDALFilterByIDTest.php
  • PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix --dry-run --diff

@shyim
Soner (shyim) merged commit f464813 into main Aug 17, 2026
3 checks passed
@shyim
Soner (shyim) deleted the codex/allow-nested-dal-id-filters branch August 17, 2026 08:45
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.

2 participants