Skip to content

Conversation

@fogelito
Copy link
Contributor

@fogelito fogelito commented Feb 12, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Improved validation for nested object queries: dotted-path queries now undergo value validation. Invalid values for deeply nested attributes that were previously bypassed will now produce validation errors.
  • Tests

    • Added end-to-end test coverage to verify error handling for invalid nested object attribute queries.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 12, 2026

📝 Walkthrough

Walkthrough

Changed validation for dotted-path OBJECT attributes in query filters so those paths no longer bypass validation but are validated via the generic Text validator. Added an end-to-end test that asserts a QueryException is thrown for an invalid numeric value against a deeply nested object attribute.

Changes

Cohort / File(s) Summary
Validation Logic
src/Database/Validator/Query/Filter.php
Replaced a continue that skipped validation for dotted OBJECT attribute paths with a break so subsequent generic/Text validation runs for those values.
Test Coverage
tests/e2e/Adapter/Scopes/ObjectAttributeTests.php
Added a negative assertion in testNestedObjectAttributeEdgeCases to expect a QueryException when a numeric value is used against a deeply nested object attribute (guarded by adapter attribute support).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • Object attribute query and index #785: Modifies src/Database/Validator/Query/Filter.php similarly to change handling of dotted OBJECT attribute paths so they are validated as text rather than skipped.

Suggested reviewers

  • abnegate

Poem

🐇 I hopped through dots and nested trees,
Found a path that once slipped free,
Now numbers trip where text should be,
Validator sings — safe and spry,
A rabbit cheers, a little hi! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Filter use break' directly corresponds to the main code change: replacing 'continue' with 'break' in the Filter.php validator logic.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-filter-break

No actionable comments were generated in the recent review. 🎉


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@abnegate abnegate merged commit 94815bf into main Feb 12, 2026
46 of 48 checks passed
@abnegate abnegate deleted the fix-filter-break branch February 12, 2026 11: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.

3 participants