Weave 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

Dload Laravel Package

internal/dload

DLoad simplifies downloading and managing binary artifacts for PHP projects. Automatically fetch tools like RoadRunner, Temporal, and custom binaries at pinned versions, ensuring consistent, cross-platform dev environments without committing binaries to version control.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Laravel/PHP Ecosystem Alignment: DLoad remains a first-class fit for Laravel/PHP projects requiring binary dependencies (CLI tools like RoadRunner, Temporal, or custom PHARs). It integrates with Composer via post-install-cmd/post-update-cmd hooks for automated dependency management.
  • Modular Design: XML-based configuration (schema-validated) plus a plugin-like software registry lets TPMs extend functionality without monolithic refactoring. Aligns with Laravel's service-provider and package-based extensibility.
  • Binary vs. PHP Dependency Duality: Unlike traditional Composer packages, DLoad bridges PHP code and native binaries — a critical gap in Laravel ecosystems (Forge, Valet, custom CLI tooling).
  • Release Delta 1.16.6 → 1.19.0 (Substantive): Unlike the previous documentation-only release, 1.19.0 changes runtime behavior. Four capability additions materially alter the architecture story:
    1. Archive extraction (.tgz/.tar) — DLoad now handles tools distributed as tarballs, not just raw binaries and PHARs. This widens coverage to most Go/Node/Rust release artifacts that previously needed bespoke curl | tar scripting.
    2. Self-hosted repository URLs — the "relies on GitHub's release API" constraint is now an architectural option rather than a hard dependency. Mirroring and air-gapped operation move from "retrofit" to "configuration."
    3. Software definitions shipped by Composer packages (<package>#<id> addressing) — the internal-registry pattern previously recommended as a hand-rolled shared package is now first-class, with shadowed-entry reporting.
    4. Version constraint engine rework — hyphen ranges, !=/<>, v prefixes, ≥5-part versions, SemVer build metadata, revised pre-release ordering, and long-number comparison.
  • Internal Refactoring (installer/registry/velox pipelines): The install and registry paths were rebuilt as pipelines with readonly step classes. Externally neutral, but it is a large diff in the code path that runs on every composer install — treat as a regression-risk surface, not a cosmetic change.

Integration Feasibility

  • Composer Integration: Unchanged and still Composer-first with native post-install script support. Integration remains <5 minutes:
    {
      "scripts": {
        "post-install-cmd": "dload get --no-interaction",
        "post-update-cmd": "dload get --no-interaction"
      }
    }
    
  • Laravel Service Provider: Unchanged — wrap DLoad in a service provider to expose Facades or Artisan commands (e.g., php artisan dload:install).
  • CI/CD Readiness: Improved. Fallback across repositories (invalid URI, unknown type) and macOS universal/x86-64 microarchitecture ranking reduce the "works on my machine" class of CI failures. Registry tail continuation from the last stored release improves incremental registry sync.
  • Upgrade Cost for 1.19.0: Low but non-zero — meaningfully higher than 1.16.6. Requires: (a) a constraint re-resolution review, (b) an install-path regression test, (c) optional adoption of archives/repository URLs/package-provided definitions. No XML schema rewrite expected.

Technical Risk

  • Version Resolution Drift (new, medium): The constraint matcher was rewritten (hyphen ranges, !=/<>, v prefix, 5+ parts, build metadata, pre-release ordering). Existing constraints may resolve to a different artifact version after upgrade without any config change. Mitigate by capturing resolved versions pre- and post-upgrade and diffing them in CI before rollout.
  • Composer-Distributed Software Definitions (new, medium): Any installed Composer package can now contribute <software> entries addressable as <package>#<id>. This is a supply-chain surface — a transitive dependency can influence what binary your build downloads. Shadowed entries are reported, which helps, but TPMs need an explicit allowlist and a review step for packages that ship definitions.
  • Archive Extraction (new, medium): .tgz/.tar support introduces classic extraction risks — path traversal, unexpected permissions, nested directory layouts producing binaries in the wrong place, and symlink handling. Validate extraction targets and post-extract binary existence; prefer pinned, checksummed archives.
  • XML Configuration Overhead (unchanged): Verbose vs. PHP/YAML/JSON. Mitigate with interactive dload init or generating dload.xml from a PHP config array.
  • Binary/Archive Compatibility (improved): asset-pattern matching plus new universal-macOS and x86-64 microarchitecture ranking reduces arch-mismatch risk. Still validate supported platforms upfront (e.g., no ARM builds for a given tool).
  • External API Dependency (materially reduced): GitHub rate limits are no longer a hard constraint — self-hosted repository URLs and mirrored registries are now supported directly.
  • PHAR vs. Binary Confusion (unchanged, docs improved): Misconfiguring type="phar" vs. type="binary" can unpack executables or skip PHARs. Documentation now also clarifies that OS packages are skipped when a binary is expected and how deep fallback goes.
  • Token Handling (fixed, security-relevant): 1.19.0 fixes GitLab tokens being sent beyond the GitLab server and API tokens leaking across redirects. If you operate against private repositories, upgrading is a security-hygiene action, not a feature upgrade.
  • Version Drift Across Minors (escalated, medium): This assessment was baselined at 1.13.1, updated at 1.16.6, and now sits at 1.19.0. 1.17 and 1.18 were not reviewed here. Given that 1.19.0 changes version matching and the install pipeline, re-validate CLI flags, XML schema, and the PHP version floor across the full 1.17→1.19 range before jumping versions.

Key Questions for TPMs

  1. Tooling Requirements: Which binary/PHAR/archive tools are critical (RoadRunner, Temporal, PHPStan, Pest)? Which are distributed only as .tgz/.tar and therefore newly addressable?
  2. Version Pinning After the Matcher Rewrite: Which constraints are loose enough to resolve differently under the new ordering? Do we re-resolve and diff before rollout, or freeze to exact versions first?
  3. Software Definition Provenance: Which Composer packages are permitted to ship <software> entries? Is there an allowlist, and who reviews additions? How are shadowed-entry warnings surfaced in CI?
  4. Repository Topology: Should we move to a self-hosted/mirrored repository URL now that it is supported, and does that change our air-gapped story from "custom build" to "config"?
  5. Environment Consistency: Should DLoad enforce specific versions (e.g., roadrunner:^2025.1) or allow flexibility? How should CI handle missing binaries — fail fast or retry?
  6. Performance: Do large Go binaries and now archive extraction impact Composer install times? Consider parallel downloads or pre-baking binaries into CI images.
  7. Security: Are all downloaded binaries trusted? DLoad does not verify checksums by default — add sha256 checks, and scan PHARs (e.g., phar.io/phar). Confirm token-scoping fixes are in place for any private repositories.

Integration Approach

Stack Fit

  • Laravel Compatibility: 100% compatible with Laravel's Composer workflow:
    • Artisan Commands: Expose DLoad's CLI as Laravel commands (php artisan dload:install).
    • Service Providers: Bind DLoad configuration for runtime access.
    • Environment Setup: Auto-load binaries in bootstrap/app.php before Laravel initializes.
  • PHP Version Support: Requires PHP 8.1+ (re-verify against 1.19.0 across 1.17/1.18 changelogs before pinning). Laravel 9+ is safe.
  • Tooling Synergy: RoadRunner (custom builds via velox.toml, whose config pipeline was refactored), Temporal (PHP SDK downloads), PHAR tooling (Psalm, PHPStan, Pest), plus newly serviceable tarball-distributed tooling.
  • Registry Synergy: Internal tool definitions can now live in a shared Composer package rather than being copy-pasted into every dload.xml.

Migration Path

  1. Constraint Audit First: Before bumping, record currently resolved tool versions, then re-resolve under 1.19.0 and diff. Treat any change as a deliberate decision, not an upgrade side effect.
  2. Pilot Phase: Start with one critical tool (e.g., RoadRunner) in a non-production app; test dload get locally, then in CI, exercising the refactored installer pipeline.
  3. Adopt New Capabilities Selectively: Migrate one tarball-distributed tool to archive extraction; stand up a self-hosted repository URL in one environment; move internal definitions into a shared package.
  4. Gradual Rollout: Add tools incrementally (Temporal → Pest → PHPStan); retire manual curl/wget/tar scripts.
  5. Full Adoption: Migrate all binary dependencies to DLoad; replace ad-hoc scripts with post-install hooks; centralize internal tools in the shared registry package with an allowlist.

Compatibility

  • Laravel Versions: Laravel 9+ (PHP 8.1+). Laravel 8 requires PHP 8.0 and a compatible fork.
  • Hosting Platforms:
    • Shared Hosting: CLI tools may be blocked; prefer type="phar" for PHP-only tools.
    • Dedicated/VPS: Full native binary and archive support.
    • Serverless: Limited — binaries may not persist; use PHARs.
    • Air-Gapped: Now viable via self-hosted repository URLs plus a mirrored registry, rather than a bespoke solution.
  • Dependency Conflicts: DLoad is isolated from Laravel's Composer dependency graph — no PHP code conflicts. However, packages that ship software definitions create a logical (not code-level) coupling worth governing.
  • 1.19.0 Impact: No XML schema rewrite indicated, but version resolution semantics and the install pipeline both changed. Existing 1.13.1-era configs should still parse; their resolved outputs may differ.

Sequencing

  1. Pre-Install: Bump the constraint to ^1.19; read 1.17→1.19 changelogs; scaffold via ./vendor/bin/dload init if starting fresh.
  2. Configuration:
    <repositories>
        <repository type="gitlab" url="https://git.internal.example.com/api/v4" />
    </repositories>
    <actions>
        <download software="rr" version="^2025.1" type="binary" extract-path="./bin" />
        <download software="internal-tool#cli" version="^2.4" type="archive" extract-path="./bin" />
        <download software="temporal" version="^1.3" type="phar" />
    </actions>
    
    Consult the references/ docs (from 1.16.6) plus the new note on OS-package skipping and fallback depth to pick the correct type, asset-pattern, and archive handling per tool.
  3. Integration: Add Composer scripts (post-install-cmd/post-update-cmd → dload get --no-interaction); optionally add an Artisan wrapper command.
  4. Validation: Exercise in CI (composer install --no-interaction && dload get --no-interaction) and verify binaries land in PATH or the expected extract path; add a resolved-version diff assertion and a checksum check.
  5. Upgrade Steps Specific to 1.19.0: Bump lockfile, diff resolved tool versions, confirm archive extraction and repository fallback behave, verify private-repo tokens are scoped correctly, and re-run the multi-arch CI matrix to exercise the new macOS/x86-64 ranking.

Operational Impact

Maintenance

  • Configuration Drift: dload.xml can diverge across environments. Commit it to Git; consider generating it from a PHP config array via a Composer script.
  • Tool Updates: New tool versions require dload.xml edits. Automate via a script that parses release metadata and rewrites constraints; use @beta/@rc stability flags for pre-release tooling — now more expressive given hyphen ranges, !=, and build-metadata support.
  • Registry Ownership: Migrate inline <software> blocks into a shared Composer package as soon as more than a handful of tools exist. 1.19.0 makes this the supported path, but it also means registry changes now arrive via Composer updates and need review discipline.
  • Upgrade Cadence: The project shipped 1.16.6 → 1.19.0 in about two weeks, with behavioral changes in version matching and the install pipeline. That cadence argues for scheduled, batched upgrades with a resolved-version diff gate, not unbounded floats and not silent auto-bumps.

Support

  • Upstream: Open-source project — support is community/GitHub-issue driven, with no vendor SLA. The 1.16.6 docs restructuring plus 1.19.0's explicit note on OS-package selection and fallback depth improve self-service troubleshooting.
  • Security-Driven Upgrades: 1.19.0 carries token-scoping fixes. For teams using private repositories, this shifts DLoad from "nice-to-have upgrade" to a scheduled security update — add it to the patch cadence.
  • Internal Ownership: Assign a named owner for dload.xml, the shared registry package, the package allowlist, and the upgrade calendar. The allowlist is a new responsibility introduced by Composer-distributed definitions.
  • Escalation Path: Because failures surface at composer install, the on-call owner is typically the build/DevOps engineer, not application developers — make that explicit in the runbook.
  • Doc Hygiene: Keep an internal pointer to the current references/ structure; the old single-file skill path is a dead reference. Add a short internal note on archive extraction and self-hosted repositories, since neither existed at 1.16.6.

Scaling

  • Install-Time Cost: Native binaries and now archive extraction add tens to hundreds of MB per install. Scale via asset caching (temp-dir), self-hosted/mirrored repositories (newly supported), and pre-baking binaries into CI base images so dload get becomes a cache hit.
  • Fleet-Wide Consistency: Version constraints in dload.xml remain the scaling lever — pin them so N environments converge on identical tool versions, especially given the matcher rework.
  • Registry Scale: The previous "migrate to a shared package before the count grows" advice is now actionable without custom tooling. Do it early; distribute via Composer rather than sync scripts.
  • Air-Gapped Scale: Now achievable through configuration — a mirrored repository URL plus a curated registry and pre-baked images — rather than a bespoke retrofit.
  • Parallelism: Still a consideration. Prefer parallel or pre-fetched downloads over serialized post-install hooks as the tool count climbs.

Failure Modes

  • Version Resolution Drift: Constraints silently resolve to different tool versions post-upgrade due to the new matcher. Diff resolved versions in CI; pin exact versions for build-critical tooling.
  • Malicious or Accidental Definition Injection: A Composer dependency ships a <software> entry that shadows or redirects a download. Enforce a package allowlist, review shadowed-entry warnings, and pin repository URLs.
  • Archive Extraction Hazards: Path traversal, unexpected permissions, or nested layouts place binaries in the wrong location. Validate extraction roots and assert executable presence post-extract.
  • GitHub API Rate Limiting / Outage: Reduced but not eliminated. Now mitigable via self-hosted repository URLs and mirrored registries; repository fallback on invalid/unknown types provides a second layer.
  • Asset Pattern Mismatch (404): Upstream renames release artifacts → silent install failure, now surfacing as a fallback warning when an older release is taken. Add a CI assertion that expected binaries exist and are executable.
  • Architecture Mismatch: Largely improved via universal-macOS and x86-64 level ranking, but still possible. Pin asset-pattern per platform; validate in a multi-arch CI matrix.
  • Token Leakage: Fixed in 1.19.0 for GitLab and cross-redirect cases. Treat pre-1.19.0 versions as unsuitable for private-repository use.
  • No Checksum Verification: Tampered or corrupted downloads may go undetected. Add sha256 validation and, for PHARs, malware scanning. This gap is unchanged and now more consequential as more artifact types are supported.
  • Partial/Truncated Downloads: Addressed — failed downloads now remove the partial file. Verify this holds for archive extractions, not just single-file downloads.
  • Air-Gapped Environments: Previously a total failure; now solvable via self-hosted repository URLs, provided the mirror and registry are deliberately designed and populated.

Ramp-Up

  • Effort: Remains low, but the surface widened. A single engineer can still pilot one tool in under a day; the Composer hook is a five-minute change. Budget an extra half-day for the version-resolution diff and archive-extraction validation.
  • Learning Curve: XML authoring (type, version constraint, asset pattern) is still the main friction. New concepts to teach: archive type, repository URLs, and package-provided software definitions.
  • Recommended Enablement: One half-day session covering XML authoring, the version registry, archive extraction, self-hosted repositories, the package allowlist, failure-mode triage, and pointers to the current references/. Update onboarding materials in the same pass.
  • Pilot-to-Production: Expect roughly one sprint from pilot to full rollout across dev, staging, and CI, assuming binaries are pre-baked into build images and constraints are pinned before the upgrade.
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.
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels