[3.x] Breaking: Remove the rebuild command#2490
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v3-dev #2490 +/- ##
===========================================
Coverage 100.00% 100.00%
+ Complexity 1615 1608 -7
===========================================
Files 169 168 -1
Lines 4073 4039 -34
===========================================
- Hits 4073 4039 -34 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
3a80b97 to
074f492
Compare
074f492 to
6f77c9c
Compare
6f77c9c to
baab792
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the vestigial user-facing rebuild CLI command in HydePHP v3, while keeping single-page compilation available via the internal StaticPageBuilder::handle() action. It also updates tests and documentation to reflect the breaking change.
Changes:
- Removed the
rebuildconsole command registration and implementation. - Updated framework tests to compile single pages via
StaticPageBuilder::handle(Pages::getPage(...))instead of invokingphp hyde rebuild. - Updated upgrade guide and docs to remove
rebuildreferences and guide programmatic consumers toStaticPageBuilder.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| UPGRADE.md | Adds v3 migration guidance for replacing php hyde rebuild <path> with StaticPageBuilder::handle() or php hyde build. |
| HYDEPHP_V3_PLANNING.md | Documents removal of the rebuild command as a v3 breaking change and notes the internal replacement. |
| docs/getting-started/console-commands.md | Removes rebuild from the console command reference table and deletes the rebuild section. |
| docs/creating-content/compile-and-deploy.md | Removes deprecated single-file compilation instructions and link to the removed rebuild docs section. |
| packages/framework/src/Console/ConsoleServiceProvider.php | Unregisters the RebuildPageCommand from the CLI. |
| packages/framework/src/Console/Commands/RebuildPageCommand.php | Deletes the command implementation entirely. |
| packages/framework/tests/Unit/Views/NavigationMenuViewTest.php | Replaces artisan rebuild usage with direct StaticPageBuilder invocation. |
| packages/framework/tests/Feature/Views/MetadataViewTest.php | Replaces artisan rebuild usage with direct StaticPageBuilder invocation in the helper build method. |
| packages/framework/tests/Feature/PostsAuthorIntegrationTest.php | Replaces artisan rebuild usage with direct StaticPageBuilder invocation across post-author integration scenarios. |
| packages/framework/tests/Unit/MediaDirectoryCanBeChangedTest.php | Removes the rebuild-specific media directory test since the command no longer exists. |
| packages/framework/tests/Feature/Commands/RebuildPageCommandTest.php | Removes tests for the deleted command. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
emmadesilva
added a commit
that referenced
this pull request
Jul 3, 2026
* Breaking: Remove the rebuild command * Fix broken anchor links in compile-and-deploy.md to use explicit anchors * Move rebuild command from Deprecated to Removed in CHANGELOG --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
emmadesilva
added a commit
that referenced
this pull request
Jul 3, 2026
* Breaking: Remove the rebuild command * Fix broken anchor links in compile-and-deploy.md to use explicit anchors * Move rebuild command from Deprecated to Removed in CHANGELOG --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
emmadesilva
added a commit
that referenced
this pull request
Jul 4, 2026
* Breaking: Remove the rebuild command * Fix broken anchor links in compile-and-deploy.md to use explicit anchors * Move rebuild command from Deprecated to Removed in CHANGELOG --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
emmadesilva
added a commit
that referenced
this pull request
Jul 4, 2026
* Breaking: Remove the rebuild command * Fix broken anchor links in compile-and-deploy.md to use explicit anchors * Move rebuild command from Deprecated to Removed in CHANGELOG --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove the
rebuildcommandWhy
rebuildis vestigial. It was added to build a single file to disk back before the realtime compiler existed, and then the RC used it internally to build-and-serve a given path. The realtime compiler now renders everything in-memory, so nothing callsrebuildanymore — which is why its signature had quietly drifted out of date. It's a command that exists for two reasons that no longer apply.There also isn't a real user-facing use case left for it. A single-page build only produces a correct
_sitewhen the page happens to be self-contained. In practice a single page change routinely invalidates aggregate outputs — sitemap, RSS feed, search index, "latest posts" listings, navigation — none of whichrebuildregenerates. So the command silently leaves you with a stale output directory that looks complete. That's a footgun with no guard, and it's the opposite of the "you don't have to fight with it" experience Hyde is meant to give.What changed
rebuildcommand.StaticPageBuilder::handle()remains available as an internal action for programmatic consumers that legitimately need to render one page. Only the user-facing command is gone.Breaking change
Removing a command is breaking, so it's landing in v3 and documented in the v3 planning notes. The deprecation shim for v2 is handled separately — this PR ships the clean removal rather than introducing deprecated code into a major. See #2491
Docs & tests
rebuildsection from the console commands referenceHYDEPHP_V3_PLANNING.mdupdated with a short motivation.UPGRADE.mdNote
Closes #2189 — but resolves it by removing
rebuildrather than merging it intobuild. The merge would have relocated the stale-output footgun under a more discoverable keystroke instead of retiring it. Removal is the right call.