feat: updater-server release plan + config transforms in PHP (Step 3)#93
Merged
Conversation
…(PHP) Step 3 (logic core). Migrates the decision logic and JSON edits of update-updater-server.sh to typed, unit-tested PHP under tools/release: - Updater\ReleasePlan - tag -> version string, URL pieces, channel/stability, release type, and the deploy percentage (X.0.0=30, X.0.1=70, else 100), including the RC vs beta/alpha display formatting. - Updater\ReleasesJson - find the entry a release replaces, build the new entry (deploy omitted at 100), apply the replace/append, and encode with the repo's tab indentation. - Updater\MajorVersions - register a new major (with minPHP) at the top. New PHPUnit suite "updater" (added to the CI matrix). 78 tests total, green. The feature-file templating and the git clone / make / PR orchestration stay in update-updater-server.sh for now; they are already covered by the tests/updater-script snapshot harness. Wiring these transforms into a command and cutting the workflow over is the follow-up (3b). Signed-off-by: skjnldsv <skjnldsv@protonmail.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.
Step 3 of the bash->PHP migration: the decision logic and JSON edits of
update-updater-server.shmove to typed, unit-tested PHP intools/release/.What this covers
Updater\ReleasePlanUpdater\ReleasesJsonUpdater\MajorVersionsThe tricky rules are now plain assertions: RC vs
beta/alphadisplay formatting (34.0.0 RC5vs35.0.0 beta 1), theX.0.0=30 / X.0.1=70 / else=100deploy split, which entry a patch vs pre-release replaces (ignoring Enterprise), and the tab indentation (the bug #89 fixed).Testing
New PHPUnit suite
updater(added to the CI area matrix). 78 tests total, green. Each test file documents what/why in its docblock.Deliberately out of scope (follow-up 3b)
The feature-file templating (the four sed/heredoc variants) and the git clone /
make config.php/ PR orchestration stay inupdate-updater-server.shfor now. That part is large, low-bug-density, and already covered by thetests/updater-scriptsnapshot harness, so it carries little benefit and real risk to rewrite. 3b will wire these transforms into a command and cut the workflow over.This PR adds the tested foundation without touching the live updater workflow.