phar-io/composer-distributor
Library to build Composer plugins that install and update PHAR-based tools instead of source code. Ideal for dev utilities like PHPUnit/PHPStan/Psalm: keep installs via Composer while avoiding dependency conflicts by distributing signed PHAR releases.
Avoid if:
apt install composer) and doesn’t need version pinning.Consider if:
"This package lets us eliminate variability in PHP builds by centrally managing Composer versions—like a ‘Docker image for Composer.’ It’s a drop-in replacement for manual downloads, ensuring every CI pipeline, internal tool, and offline environment uses the same, verified Composer version. This reduces security risks, speeds up onboarding, and cuts DevOps costs by removing ad-hoc scripts. Think of it as Composer-as-a-service for our toolchain."
Key Outcomes:
*"This is a Swiss Army knife for Composer distribution—perfect for:
php my-tool.phar) without global installs.How it works:
Migration path:
curl | php scripts with this API in 10 minutes.composer.json as a dev dependency.Tradeoffs:
composer self-update, but 100x more reliable for automation."*How can I help you explore Laravel packages today?