Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Composer Distributor Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build Pipeline Standardization: Enables consistent Composer versioning across CI/CD environments, reducing "works on my machine" issues and ensuring reproducible builds.
  • Security & Compliance: Integrity verification (hash/signature checks) aligns with security-first policies, especially for regulated industries (e.g., healthcare, finance).
  • Cost Efficiency: Eliminates reliance on external download scripts or manual version management, reducing maintenance overhead for DevOps teams.
  • Offline/Controlled Environments: Critical for air-gapped systems, embedded devices, or internal tooling where direct internet access is restricted.
  • Tooling Integration: Supports internal developer tools (e.g., custom CLI wrappers, IDE plugins) that require pinned Composer versions for consistency.
  • Vendor Lock-in Mitigation: Reduces dependency on Composer’s global installation, improving portability of PHP-based tooling.
  • Roadmap for PHP Ecosystem Tools: If building a platform-as-a-service (PaaS) or developer toolchain, this ensures Composer is a first-class, managed dependency.

When to Consider This Package

  • Avoid if:

    • Your team uses system-level Composer installations (e.g., apt install composer) and doesn’t need version pinning.
    • You’re in a public cloud environment with stable, high-bandwidth internet access and no offline constraints.
    • Your CI/CD already handles Composer via pre-installed images (e.g., Docker/GitHub Actions PHP containers).
    • You prioritize simplicity over reproducibility (e.g., prototyping or non-critical projects).
    • Your organization lacks PHP tooling maturity (e.g., no existing CI/CD pipelines or build automation).
  • Consider if:

    • You manage multi-environment deployments (dev/staging/prod) requiring identical Composer versions.
    • Your builds run in offline or restricted networks (e.g., corporate intranets, embedded systems).
    • You need auditability for compliance (e.g., tracking exact Composer versions used in builds).
    • Your team uses custom PHP tooling (e.g., internal scaffolding tools, static analysis) that must bundle Composer.
    • You’re migrating from ad-hoc download scripts to a more maintainable solution.

How to Pitch It (Stakeholders)

For Executives:

"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:

  • Reproducible builds (no more "it works on my machine" fires).
  • Security compliance (verified downloads, no tampered binaries).
  • Cost savings (no more maintaining custom download logic).
  • Scalability (works for 10 devs or 10,000 builds).

For Engineering/DevOps:

*"This is a Swiss Army knife for Composer distribution—perfect for:

  • CI/CD: Pin Composer versions per project/branch without bloating Docker images.
  • Offline environments: Cache PHARs locally for air-gapped or restricted networks.
  • Tooling: Bundle Composer with internal scripts (e.g., php my-tool.phar) without global installs.
  • Security: Automatically verify PHARs via signatures/hashes (no more trusting random downloads).

How it works:

  1. Fetch: Downloads Composer PHAR once, caches it.
  2. Verify: Checks hashes/signatures (configurable).
  3. Reuse: Makes it available to any PHP process in your pipeline.

Migration path:

  • Replace curl | php scripts with this API in 10 minutes.
  • Add to your composer.json as a dev dependency.
  • Profit from zero flakiness in builds.

Tradeoffs:

  • Slightly more complex than composer self-update, but 100x more reliable for automation."*
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
cocosmos/filament-sticky-save-bar
patrickbussmann/oauth2-apple
3brs/enterprise-security-bundle
anousss007/vigilance
supportpal/eloquent-model
ardenexal/fhir-models
laravel-at/laravel-image-sanitize
romalytar/yammi-audit-log-laravel
ardenexal/fhir-validation
arshaviras/weather-widget
laravel-chronicle/core
sunchayn/nimbus
daikazu/eloquent-salesforce-objects
unseen-codes/chat
romalytar/yammi-jobs-monitoring-laravel
kisame76/filament-db-table-state
nqxcode/laravel-lucene-search
dpfx/laravel-livewire-wizards
workos/workos-php-laravel
sofa/laravel-global-scope