Skip to content

feat: updater-server in PHP + retire update-updater-server.sh (3b)#95

Merged
skjnldsv merged 2 commits into
mainfrom
feature/php-updater-3b
Jun 9, 2026
Merged

feat: updater-server in PHP + retire update-updater-server.sh (3b)#95
skjnldsv merged 2 commits into
mainfrom
feature/php-updater-3b

Conversation

@skjnldsv

@skjnldsv skjnldsv commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #94 (uses the snapshot helpers). Base retargets to main once #94 merges.

Completes Step 3: the updater-server logic moves from update-updater-server.sh to typed, unit-tested PHP, and release-updater.yml calls it. The bash script + its harness are removed.

What

  • Updater\FeatureFiles - the four feature-file variants (patch / RC-beta bump / first stable / first pre-release) as pure string transforms.
  • Updater\Signature - 64-char base64 wrapping + line-wise replacement.
  • Updater\FeatureInputs + Updater\Bump - apply a release to a checked-out updater_server (releases.json, major_versions.json, feature files).
  • updater:bump console command.

Parity (the key bit)

BumpParityTest runs the PHP Bump against the former bash harness fixtures (base + 8 scenarios, moved into tools/release/tests/fixtures/updater/) and asserts byte-for-byte identical releases.json, major_versions.json and feature files. So the port is provably equivalent to the old script across patch, RC bump, beta bump, beta->rc, first stable and first beta. config.php is excluded (generated by the updater_server Makefile). 96 tests total, green.

Cutover

  • release-updater.yml: set up PHP + composer, fetch the internal version and minimum PHP from nextcloud/server, clone updater_server, run updater:bump, regenerate config.php via make, and open the PR. Same RELEASE_TOKEN, same dry_run.
  • Removed update-updater-server.sh, the bash run.sh harness, and test-updater-script.yml. READMEs updated.

Note

A pre-existing quirk is preserved for parity: when the previous major has no stable release yet, the appended scenario's received version is the literal "null" (matching jq -r on a missing key). Worth fixing separately, but kept here so the migration is a faithful 1:1.

The clone / make / commit / PR glue in the workflow is not CI-tested here; validate with a release-updater dry-run before relying on it.

@skjnldsv skjnldsv added the enhancement New feature or request label Jun 9, 2026
Base automatically changed from feature/php-snapshot-tests to main June 9, 2026 12:36
…cript (3b)

Completes the updater migration. The feature-file templating and the
config/releases.json + config/major_versions.json edits are now typed,
unit-tested PHP, and release-updater.yml calls the new command.

tools/release additions:
- Updater\FeatureFiles - the four feature-file variants (patch, prerelease,
  first_stable, first_prerelease) as pure string transforms.
- Updater\Signature - 64-char wrapping + line-wise replacement.
- Updater\FeatureInputs / Updater\Bump - apply a release to a checked-out
  updater_server (releases.json, major_versions.json, feature files).
- updater:bump console command.

Testing:
- BumpParityTest runs Bump against the former bash harness fixtures (now under
  tools/release/tests/fixtures/updater) and asserts byte-for-byte identical
  output across all 8 scenarios - proving exact parity with the old script.
  config.php is excluded (generated by the updater_server Makefile). 96 tests.

Cutover:
- release-updater.yml: set up PHP + composer, fetch internal version and minPHP
  from nextcloud/server, clone updater_server, run updater:bump, regenerate
  config.php via make, open the PR. Same RELEASE_TOKEN, same dry-run input.
- Removed update-updater-server.sh, the bash run.sh harness, and
  test-updater-script.yml. READMEs updated.

A pre-existing quirk is preserved for parity: when the previous major has no
stable release yet, the appended scenario's received version is the literal
"null" (matching `jq -r` on a missing key).

Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
@skjnldsv skjnldsv force-pushed the feature/php-updater-3b branch from 2a7cb12 to 6f18b56 Compare June 9, 2026 12:37
A patch/first-stable run with no existing entry for the major (e.g. re-running
an already-applied release) previously proceeded with empty old values, and the
empty version string matched the """ doc-string delimiters, corrupting every
signature block. Match the bash script and throw instead. Found via a live
updater dry-run.

Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
@skjnldsv skjnldsv merged commit 6d2accf into main Jun 9, 2026
5 of 6 checks passed
@skjnldsv skjnldsv deleted the feature/php-updater-3b branch June 9, 2026 12:58
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