Skip to content

Commit 3615698

Browse files
oschwaldclaude
andcommitted
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 <noreply@anthropic.com>
1 parent 4e9ccee commit 3615698

4 files changed

Lines changed: 45 additions & 3 deletions

File tree

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ ac*.m4
2020
autom4te.cache/
2121
build/
2222
composer.lock
23-
composer.phar
2423
config.[^mw]*
2524
configure*
2625
core

dev-bin/release.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ check_command php
3535
check_command phpize
3636
check_command pecl
3737

38+
# composer.phar is managed by mise (see mise.toml)
39+
check_command composer.phar
40+
3841
# Check that we're not on the main branch
3942
current_branch=$(git branch --show-current)
4043
if [ "$current_branch" = "main" ]; then
@@ -100,8 +103,7 @@ phpize
100103
make
101104
popd
102105

103-
php -n -dextension=ext/modules/maxminddb.so composer.phar self-update
104-
php -n -dextension=ext/modules/maxminddb.so composer.phar update
106+
php -n -dextension=ext/modules/maxminddb.so "$(mise which composer.phar)" update
105107

106108
php -n -dextension=ext/modules/maxminddb.so ./vendor/bin/phpunit
107109
php -n ./vendor/bin/phpunit

mise.lock

Lines changed: 40 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mise.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
lockfile = true
33

44
[tools]
5+
"github:composer/composer" = "latest"
56
lychee = "latest"
67

78
[tasks.check-links]

0 commit comments

Comments
 (0)