Skip to content

[2.x] Deprecate the rebuild command#2491

Merged
emmadesilva merged 3 commits into
masterfrom
v2/deprecate-rebuild-command
Jul 3, 2026
Merged

[2.x] Deprecate the rebuild command#2491
emmadesilva merged 3 commits into
masterfrom
v2/deprecate-rebuild-command

Conversation

@emmadesilva

Copy link
Copy Markdown
Member

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

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.
@emmadesilva emmadesilva temporarily deployed to pr-documentation-2491 July 3, 2026 19:30 — with GitHub Actions Inactive
@emmadesilva emmadesilva changed the title Deprecate the rebuild command [2.x] Deprecate the rebuild command Jul 3, 2026
@emmadesilva emmadesilva requested a review from Copilot July 3, 2026 19:32
@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (f7e2ebb) to head (9a35cac).
⚠️ Report is 7 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 rebuild command 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 return in the _media branch. The info('All done!') and return 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.

Comment thread docs/creating-content/compile-and-deploy.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@emmadesilva emmadesilva temporarily deployed to pr-documentation-2491 July 3, 2026 19:35 — with GitHub Actions Inactive
@emmadesilva emmadesilva marked this pull request as ready for review July 3, 2026 19:40
Removed the @SInCE tag from the deprecation warning comment as it feels unsemantic.
@emmadesilva emmadesilva merged commit e4c6d40 into master Jul 3, 2026
21 checks passed
@emmadesilva emmadesilva deleted the v2/deprecate-rebuild-command branch July 3, 2026 19:45
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