Skip to content

Conversation

@fogelito
Copy link
Contributor

@fogelito fogelito commented Jan 14, 2026

Summary by CodeRabbit

  • Refactor
    • Improved internal filter handling mechanism with enhanced type declarations and documentation.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 14, 2026

Warning

Rate limit exceeded

@fogelito has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 13 minutes and 50 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between c162434 and 87038de.

📒 Files selected for processing (1)
  • src/Database/Database.php
📝 Walkthrough

Walkthrough

The $disabledFilters property type is changed from nullable to non-nullable array, and the decodeAttribute method is refactored to compute a skip flag and pass it to filter decoders instead of using early-return checks for filter application logic.

Changes

Cohort / File(s) Summary
Filter decode refactoring
src/Database/Database.php
Type declaration updated: $disabledFilters changed from protected ?array to protected array. Docblock updated from @var array<string, bool>|null to @var array<string, bool>. Method decodeAttribute refactored to compute a skip flag instead of early-returning; decode filter calls now receive the skip parameter for conditional filter bypass.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • Feat/skipfilters optional list #657: Modifies Database::$disabledFilters and the decodeAttribute filter-bypass logic with a per-filter skip list mechanism.
  • 0.71.x #662: Updates filter-skipping logic in Database.php involving the disabledFilters property and decodeAttribute method.

Poem

🐰 A filter once fought with its flags,
But now it computes without lags,
No early returns to delay the show,
Just skip signals stealing the flow,
The database hops with refined flair! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'skipFilters' is vague and generic, using a camelCase identifier that doesn't clearly describe the actual changes made. Consider using a more descriptive title that explains what the change accomplishes, such as 'Refactor filter disabling mechanism to use skip parameter' or 'Change disabledFilters type and implement skip flag logic'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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


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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@src/Database/Database.php`:
- Around line 8464-8477: Move the $skip evaluation (the line setting $skip =
$this->filter === false || isset($this->disabledFilters[$filter])) to occur
before the NotFoundException check in decodeAttribute, then call the decoder as
you already do; update every built-in filter decoder closure (json, datetime,
point, linestring, polygon, vector, object) to accept the extra parameter
signature (mixed $value, Document $document, Database $database, bool $skip =
false) and return early with if ($skip) return $value; so they won’t error on
the named parameter skip and will short-circuit when filtering is disabled.
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 783193d and c162434.

📒 Files selected for processing (1)
  • src/Database/Database.php
🧰 Additional context used
🪛 PHPMD (2.15.0)
src/Database/Database.php

8475-8475: Avoid unused local variables such as '$filters'. (undefined)

(UnusedLocalVariable)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Setup & Build Docker Image
🔇 Additional comments (1)
src/Database/Database.php (1)

395-399: No breaking changes from $disabledFilters becoming non-nullable.

The repository contains no code that assigns null to disabledFilters, and all usage patterns are compatible with a non-nullable array type. The property is always initialized as [] and only ever assigned array values (either empty or populated with filter names). The existing backup/restore pattern in the codebase works correctly with this non-nullable type.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

@fogelito fogelito marked this pull request as draft January 14, 2026 08:30
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