From 36156984f9583e1abef7ebab65b7b977a101d87f Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Tue, 21 Jul 2026 08:00:16 -0700 Subject: [PATCH] Manage composer via mise The release script previously used a local composer.phar kept current via self-update. Install it via mise's github backend instead. The version is pinned in mise.lock, which records per-platform checksums, and mise additionally verifies GitHub artifact attestations at install time. The php -n -dextension=... wrapper is kept so composer continues to see the built ext-maxminddb as a platform package. Co-Authored-By: Claude Fable 5 --- .gitignore | 1 - dev-bin/release.sh | 6 ++++-- mise.lock | 40 ++++++++++++++++++++++++++++++++++++++++ mise.toml | 1 + 4 files changed, 45 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index bd8a375..519f58c 100644 --- a/.gitignore +++ b/.gitignore @@ -20,7 +20,6 @@ ac*.m4 autom4te.cache/ build/ composer.lock -composer.phar config.[^mw]* configure* core diff --git a/dev-bin/release.sh b/dev-bin/release.sh index 6f1e023..39b195a 100755 --- a/dev-bin/release.sh +++ b/dev-bin/release.sh @@ -35,6 +35,9 @@ check_command php check_command phpize check_command pecl +# composer.phar is managed by mise (see mise.toml) +check_command composer.phar + # Check that we're not on the main branch current_branch=$(git branch --show-current) if [ "$current_branch" = "main" ]; then @@ -100,8 +103,7 @@ phpize make popd -php -n -dextension=ext/modules/maxminddb.so composer.phar self-update -php -n -dextension=ext/modules/maxminddb.so composer.phar update +php -n -dextension=ext/modules/maxminddb.so "$(mise which composer.phar)" update php -n -dextension=ext/modules/maxminddb.so ./vendor/bin/phpunit php -n ./vendor/bin/phpunit diff --git a/mise.lock b/mise.lock index 156e912..541df92 100644 --- a/mise.lock +++ b/mise.lock @@ -1,5 +1,45 @@ # @generated - this file is auto-generated by `mise lock` https://mise.jdx.dev/dev-tools/mise-lock.html +[[tools."github:composer/composer"]] +version = "2.10.2" +backend = "github:composer/composer" + +[tools."github:composer/composer"."platforms.linux-arm64"] +checksum = "sha256:5ee7125f8a30a34d246cefdc0bc85b8a783b28f2aec968994118512350d28027" +url = "https://github.com/composer/composer/releases/download/2.10.2/composer.phar" +url_api = "https://api.github.com/repos/composer/composer/releases/assets/463051343" +provenance = "github-attestations" + +[tools."github:composer/composer"."platforms.linux-arm64-musl"] +checksum = "sha256:5ee7125f8a30a34d246cefdc0bc85b8a783b28f2aec968994118512350d28027" +url = "https://github.com/composer/composer/releases/download/2.10.2/composer.phar" +url_api = "https://api.github.com/repos/composer/composer/releases/assets/463051343" +provenance = "github-attestations" + +[tools."github:composer/composer"."platforms.linux-x64"] +checksum = "sha256:5ee7125f8a30a34d246cefdc0bc85b8a783b28f2aec968994118512350d28027" +url = "https://github.com/composer/composer/releases/download/2.10.2/composer.phar" +url_api = "https://api.github.com/repos/composer/composer/releases/assets/463051343" +provenance = "github-attestations" + +[tools."github:composer/composer"."platforms.linux-x64-musl"] +checksum = "sha256:5ee7125f8a30a34d246cefdc0bc85b8a783b28f2aec968994118512350d28027" +url = "https://github.com/composer/composer/releases/download/2.10.2/composer.phar" +url_api = "https://api.github.com/repos/composer/composer/releases/assets/463051343" +provenance = "github-attestations" + +[tools."github:composer/composer"."platforms.macos-arm64"] +checksum = "sha256:5ee7125f8a30a34d246cefdc0bc85b8a783b28f2aec968994118512350d28027" +url = "https://github.com/composer/composer/releases/download/2.10.2/composer.phar" +url_api = "https://api.github.com/repos/composer/composer/releases/assets/463051343" +provenance = "github-attestations" + +[tools."github:composer/composer"."platforms.windows-x64"] +checksum = "sha256:5ee7125f8a30a34d246cefdc0bc85b8a783b28f2aec968994118512350d28027" +url = "https://github.com/composer/composer/releases/download/2.10.2/composer.phar" +url_api = "https://api.github.com/repos/composer/composer/releases/assets/463051343" +provenance = "github-attestations" + [[tools.lychee]] version = "0.23.0" backend = "aqua:lycheeverse/lychee" diff --git a/mise.toml b/mise.toml index 30e2fba..97b01a8 100644 --- a/mise.toml +++ b/mise.toml @@ -2,6 +2,7 @@ lockfile = true [tools] +"github:composer/composer" = "latest" lychee = "latest" [tasks.check-links]