Windows: Composer installer checksum fails because installer is written in text mode
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 92/100
Research direction
Read hooks/post_install.lua around lines 215–220 and check how the Composer installer is saved before SHA-384 verification. The issue identifies util.write_binary_file as the existing way to preserve the installer’s bytes. Done means the checksum passes and Composer installs on Windows, with verification still enabled.
Written by the indexing model from the issue text.
Description
Description
Installing PHP on Windows through mise fails during Composer installation. The PHP archive downloads and extracts successfully, but verification of the Composer installer fails.
Environment
- Windows x64, PowerShell
- mise
2026.11.15 windows-x64 (2026-11-29) - Plugin commit:
aa2922170710cfe4d7277cca4324cf1d38b4efc8 - Requested PHP version:
8.6.0
Steps to reproduce
With the unmodified plugin at the commit above, run:
mise use vfox:version-fox/[email protected]
Actual behavior
Installation aborts with:
The Composer installer does not match the sha384 that Composer publishes;
Composer was not installed.
Expected behavior
The downloaded installer should retain its original bytes, pass SHA-384 verification and install Composer.
Cause and proposed fix
In hooks/post_install.lua, the installer is saved using util.write_file, which opens the file in text mode. On Windows, this converts LF line endings to CRLF and changes the checksum.
The plugin already provides util.write_binary_file, which preserves the downloaded bytes.
- _, err = util.write_file(setup, installer)
+ _, err = util.write_binary_file(setup, installer)
Validation
After applying only this change locally and retrying:
- Composer’s existing SHA-384 verification passed.
- PHP installation completed.
mise exec -- php -vreported PHP8.6.0.mise exec -- composer --versionreported Composer2.11.3.
Checksum verification remained enabled.
- Dominant language
- Lua
- Stars
- 21
- Forks
- 12
- Avg merge
- 3h 16m
- Merged PRs (30d)
- 10
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Similar issues
-
bug(image): image disappears when returning to an existing image buffer (hidden never reset)Possibly taken @ApexGP claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
folke/snacks.nvim#3011 ·
-
easy first-contributor first-contributors good first issue help wanted lua up-for-grabs
Difficulty 1/5 1-3 hours Newbie friendliness 94/100
fork-commit-merge/fork-commit-merge#8750 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
NaixGames/Polycosmos#81 ·
-
cwc.kbd.xkb_layout/xkb_options changes are not applied to all keyboard groups after reload/runtimeOpen
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
blood of heroesOpenbug discord triage
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day