Skip to content

fix: allow nested DAL ID filters - #44

Draft
Jonas Elfering (keulinho) wants to merge 2 commits into
mainfrom
codex/allow-nested-dal-id-filters
Draft

fix: allow nested DAL ID filters#44
Jonas Elfering (keulinho) wants to merge 2 commits into
mainfrom
codex/allow-nested-dal-id-filters

Conversation

@keulinho

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

Copy link
Copy Markdown

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

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.

1 participant