Skip to content

feat: updater-server release plan + config transforms in PHP (Step 3)#93

Merged
skjnldsv merged 1 commit into
mainfrom
feature/php-updater-server
Jun 9, 2026
Merged

feat: updater-server release plan + config transforms in PHP (Step 3)#93
skjnldsv merged 1 commit into
mainfrom
feature/php-updater-server

Conversation

@skjnldsv

@skjnldsv skjnldsv commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Step 3 of the bash->PHP migration: the decision logic and JSON edits of update-updater-server.sh move to typed, unit-tested PHP in tools/release/.

What this covers

class does
Updater\ReleasePlan tag -> version string, URL version/dir, channel/stability, release type, deploy %
Updater\ReleasesJson find the entry being replaced, build the new entry, apply replace/append, encode (tab-indented)
Updater\MajorVersions register a new major (with minPHP) at the top

The tricky rules are now plain assertions: RC vs beta/alpha display formatting (34.0.0 RC5 vs 35.0.0 beta 1), the X.0.0=30 / X.0.1=70 / else=100 deploy 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 in update-updater-server.sh for now. That part is large, low-bug-density, and already covered by the tests/updater-script snapshot 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.

…(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>
@skjnldsv skjnldsv added the enhancement New feature or request label Jun 9, 2026
@skjnldsv skjnldsv merged commit bec87d5 into main Jun 9, 2026
6 checks passed
@skjnldsv skjnldsv deleted the feature/php-updater-server branch June 9, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

1 participant