Skip to content

chore: automate "Config" and "All Changes" sections of the upgrade guide#10392

Merged
paulbalandan merged 1 commit into
codeigniter4:developfrom
paulbalandan:upgrade-guide-changes
Jul 8, 2026
Merged

chore: automate "Config" and "All Changes" sections of the upgrade guide#10392
paulbalandan merged 1 commit into
codeigniter4:developfrom
paulbalandan:upgrade-guide-changes

Conversation

@paulbalandan

Copy link
Copy Markdown
Member

Description
This PR automates the last manual-command step of the changelog/upgrade docs flow. The "All Changes" section of each version's upgrade guide was previously produced by copy-pasting a 4-line git diff command with ~20 exclude patterns from RELEASE.md and hand-converting its output into RST bullets, with the "Config" subsection filled separately by hand.

New script admin/update-upgrade-guide.php (local git only, no GitHub CLI needed):

  • Usage: php admin/update-upgrade-guide.php 4.x.x [--dry-run]. Diffs the project space against the previous release tag, resolved as the highest stable vX.Y.Z tag below the given version. This works regardless of the checked out branch, excludes the old prerelease tags, and stays correct when regenerating an older guide.
  • Fills the "All Changes" section with sorted bullets, marking deleted files (deleted) and writing "No project files were changed in this release." when the diff is empty. This list is regenerated on every run.
  • Fills the "Config" subsection from the app/Config/ subset: modified files as the merge-recommended list and added files under "These files are new in this release:", or "No config files were changed in this release." when there are none. The annotation notes under each entry remain manual.
  • The "Config" subsection is written only while it still holds the - @TODO placeholder. Entries are sometimes added ahead of time for changes that need discussion, so existing content is never overwritten. Instead the script prints any changed config files not yet mentioned, for manual merging.
  • The exclude list for the project space now lives in the script instead of the doc.

Also included:

  • admin/RELEASE.md replaces the manual diff command block with the script step.
  • admin/README.md documents the script.
  • tests/system/AutoReview/UpdateUpgradeGuideTest.php covers usage errors, the missing-guide error, dry-run (no writes), and the real write path with restore. No network is involved, so this suite runs fully in CI.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@paulbalandan paulbalandan force-pushed the upgrade-guide-changes branch from 5039032 to f23bd78 Compare July 8, 2026 19:01
@paulbalandan paulbalandan merged commit 76b040a into codeigniter4:develop Jul 8, 2026
54 checks passed
@paulbalandan paulbalandan deleted the upgrade-guide-changes branch July 8, 2026 19:29
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