[2.x] Deprecate the rebuild command#2491
Conversation
It has no remaining internal consumers now that the realtime compiler renders pages in-memory, and single-page builds can silently leave aggregate outputs (sitemap, RSS, search index, navigation) stale. The command still works as before, but now prints a deprecation warning pointing to StaticPageBuilder::handle() for programmatic single-page builds. It will be removed in v3.0.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2491 +/- ##
===========================================
Coverage 100.00% 100.00%
- Complexity 1614 1615 +1
===========================================
Files 169 169
Lines 4069 4074 +5
===========================================
+ Hits 4069 4074 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Deprecates the rebuild console command in the 2.x line by adding a runtime warning and updating documentation/changelog, guiding users toward Hyde\Framework\Actions\StaticPageBuilder::handle() for programmatic single-page builds ahead of the v3 removal.
Changes:
- Added a deprecation warning emitted by the
rebuildcommand at runtime. - Added/updated docs and changelog entries to reflect the deprecation and rationale.
- Added test coverage to assert the deprecation warning is printed.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/framework/tests/Feature/Commands/RebuildPageCommandTest.php | Adds a feature test asserting the deprecation warning output. |
| packages/framework/src/Console/Commands/RebuildPageCommand.php | Emits the deprecation warning and marks the command as deprecated. |
| docs/getting-started/console-commands.md | Updates command reference and adds a deprecation warning callout. |
| docs/creating-content/compile-and-deploy.md | Updates getting-started guidance to note deprecation and link to the replacement API. |
| CHANGELOG.md | Records the deprecation under the Unreleased “Deprecated” section. |
Comments suppressed due to low confidence (1)
packages/framework/src/Console/Commands/RebuildPageCommand.php:49
- There is unreachable code after the early
returnin the_mediabranch. Theinfo('All done!')andreturn Command::SUCCESS;will never execute, which is confusing and can hide intended behavior (like printing the finish message).
$this->info('All done!');
return Command::SUCCESS;
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Removed the @SInCE tag from the deprecation warning comment as it feels unsemantic.
It has no remaining internal consumers now that the realtime compiler renders pages in-memory, and single-page builds can silently leave aggregate outputs (sitemap, RSS, search index, navigation) stale.
The command still works as before, but now prints a deprecation warning pointing to StaticPageBuilder::handle() for programmatic single-page builds. It will be removed in v3.0 in #2490