Skip to content

Add disabling preloading check in FixTree console#4226

Merged
ildyria merged 1 commit intomasterfrom
avoid-breaking-fix-tree-command
Mar 24, 2026
Merged

Add disabling preloading check in FixTree console#4226
ildyria merged 1 commit intomasterfrom
avoid-breaking-fix-tree-command

Conversation

@ildyria
Copy link
Copy Markdown
Member

@ildyria ildyria commented Mar 24, 2026

Fixes #4223

Not the prettiest fix TBH, but the simplest.

Summary by CodeRabbit

  • Bug Fixes
    • Improved the reliability of the tree-fixing operation to handle edge cases more robustly.

@ildyria ildyria requested a review from a team as a code owner March 24, 2026 22:39
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 24, 2026

📝 Walkthrough

Walkthrough

The change imports Illuminate\Database\Eloquent\Model and wraps the tree-fixing operation with temporary disabling and re-enabling of Eloquent's strict mode. Model strict behavior is toggled off before $query->fixTree() and restored immediately after, without modifying surrounding logic.

Changes

Cohort / File(s) Summary
Strict Mode Control for Tree Fixing
app/Console/Commands/FixTree.php
Added import of Illuminate\Database\Eloquent\Model and wrapped the tree-fixing operation with Model::shouldBeStrict(false) before and Model::shouldBeStrict(true) after the $query->fixTree() call to temporarily disable strict mode during the operation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 With whiskers twitching, strict mode bends,
A toggle dance where control descends,
Trees are fixed, then strict returns,
As our fuzzy logic softly turns!

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
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
Copy Markdown

@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


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2243e1c6-63ca-4aea-8b9d-3677b2f7ee67

📥 Commits

Reviewing files that changed from the base of the PR and between 1bf72e7 and c80e00a.

📒 Files selected for processing (1)
  • app/Console/Commands/FixTree.php

@ildyria ildyria merged commit b21c62e into master Mar 24, 2026
45 checks passed
@ildyria ildyria deleted the avoid-breaking-fix-tree-command branch March 24, 2026 23:41
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