Repository navigation
feat: install Mago 1.50.0 in the image - #11
Merged
Merged
Conversation
The image carried Mago 1.46.0 as long as it was based on jakzal/phpqa. The lean rewrite (361dada) dropped it along with the rest of the toolbox, so projects calling "mago" in the container now fail. Mago comes back pinned, as the static musl build extracted to /tools/mago for amd64 and arm64, at 1.50.0 instead of 1.46.0: the formatter of 1.46 is not idempotent (on a 693 file code base, 19 files still move on a second pass, none on a third), which leaves a tree "mago format --check" refuses after a single pass. 1.50 settles in one. The version lives in the MAGO_VERSION build argument. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Spomky
approved these changes
Sep 21, 2026
Member
|
Thanks! |
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.
What
mainhas carried no Mago since 361dada. The binary came fromjakzal/phpqa(1.46.0 in/tools/mago), and the lean rewrite dropped that base image, somagois simply gone from the published images:docker run --rm ghcr.io/spomky-labs/phpqa:8.4 mago --versionsaysnot found.This installs it again, pinned: the static musl release extracted to
/tools/mago, amd64 and arm64, version in theMAGO_VERSIONbuild argument (1.50.0, the current stable, released 2026-09-21). The binary is fully static, so it adds nothing to the runtime libraries the image computes withldd. The smoke test at the end of the runtime stage now runsmago --versionlike the other tools.Why 1.50 and not 1.46
Measured on a 693 file PHP code base whose QA runs in this image:
mago format, 19 files move again on a second pass, none on a third. One pass therefore leaves a tree thatmago format --checkrefuses, which means a red CI right after formatting.Verified
mago-1.50.0-<triple>/mago, hence--strip-components=1.linux/arm64natively,linux/amd64under emulation):mago --versionprintsmago 1.50.0, andlddconfirms the binary is statically linked.linux/arm64only (docker build --build-arg PHP_VERSION=8.4 ., exit 0). The smoke test of the runtime stage printedmago 1.50.0, and on the built imagedocker run --rm <image> mago --versiongivesmago 1.50.0, withwhich magoresolving to/tools/magoas user 1001.Not in this PR
.castor/phpqa.phpexposes no Mago task, so this adds a tool the centralized tasks do not call. Projects invokemagoin the container themselves today. Say the word if you would rather haveqa:mago-format/qa:mago-linttasks alongside it; this PR deliberately does not add any.🤖 Generated with Claude Code