Refactor migration class declaration and improve test assertions for migration controller.#20816
Conversation
terabytesoftw
commented
Apr 11, 2026
| Q | A |
|---|---|
| Is bugfix? | ✔️ |
| New feature? | ❌ |
| Breaks BC? | ❌ |
…migration controller.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughTest assertions were refactored to use correct PHPUnit method names, output buffering was updated in a migration controller test, phpstan baseline ignore entries were removed for those assertions, and time-based test data was changed to fixed absolute UTC timestamps. Changes
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tests/framework/console/controllers/MigrateControllerTest.php`:
- Around line 451-457: The test assigns to $params[0] before $params is defined,
causing an undefined-variable notice; initialize $params as an array (e.g.,
$params = []) before assigning $params[0] so the call to
$controller->run('create', $params) receives a properly defined array; update
the MigrateControllerTest method containing the $params assignment accordingly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Pro
Run ID: c98ff07a-48f5-4b23-a88d-3f1e00deff49
📒 Files selected for processing (5)
phpstan-baseline.neontests/data/console/migrate_create/default.phptests/framework/console/controllers/MigrateControllerTest.phptests/framework/console/controllers/MigrateControllerTestTrait.phptests/framework/web/CookieCollectionTest.php
💤 Files with no reviewable changes (2)
- tests/data/console/migrate_create/default.php
- phpstan-baseline.neon
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 22.0 #20816 +/- ##
=========================================
Coverage 82.76% 82.76%
Complexity 11311 11311
=========================================
Files 385 385
Lines 29802 29802
=========================================
Hits 24665 24665
Misses 5137 5137 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|