internal/dload
DLoad is a PHP tool to download and manage binary artifacts (RoadRunner, Temporal, custom tools) for your projects. It automates installs, pins versions, handles cross-platform builds, and keeps binaries out of VCS via CLI and config.
composer.json via post-install hooks, aligning with Laravel’s dependency resolution workflow.--os, --arch) ensures compatibility with Laravel’s multi-environment deployments (e.g., Docker, Kubernetes, local dev).post-update-cmd script hook allows DLoad to run automatically during composer install, mirroring Laravel’s post-autoload-dump behavior. This reduces friction for developers.config/ directory, enabling environment-specific overrides (e.g., dev vs. prod binaries).dload CLI commands (init, get, build) provide a familiar interface for Laravel developers accustomed to Artisan commands.Dload::configure()).rr) might clash with system PATH or Laravel’s bin/ directory. Risk: Execution precedence issues. Mitigation: Enforce explicit paths in configuration (e.g., extract-path).Binary Lifecycle Management:
Laravel-Specific Integration:
bootstrap/app.php to add binary paths to PHP_BINARY_PATH or PATH environment variables?php artisan dload:update)?Performance and Scaling:
Security:
Customization:
composer.json scripts for automatic binary installation (e.g., post-update-cmd).php artisan dload:init) for consistency.config/dload.php and sync it to dload.xml via a service provider.Dload\Events\BinaryDownloaded) to integrate with Laravel’s event bus (e.g., notify Slack on failure).PATH during Laravel bootstrapping (via bootstrap/app.php).env() helper (e.g., env('DLOAD_RR_PATH')).composer install + php artisan serve).dload init command to generate dload.xml and manually verify binaries (e.g., RoadRunner, Temporal).composer.json as a dev dependency (require-dev internal/dload).post-update-cmd to run dload get silently in CI/CD.wget/curl scripts) with DLoad.laravel-dload) that extends DLoad with:
dload:update, dload:show).Dload::download('rr')).bin/ directory or custom binary paths.dload get rr temporal in CI).README.md.composer.json script to check prerequisites:
"scripts": {
"pre-update-cmd": "if ! command -v go &> /dev/null; then echo \"Error: Go is required for RoadRunner builds.\"; exit 1; fi"
}
composer require internal/dload -W to install DLoad.php artisan dload:init (custom Artisan command).dload get to post-update-cmd for automatic downloads../bin/rr worker:run).runtime/ directory between CI runs to speed up builds.- name: Download binaries
run: composer dload-get --no-interaction
dload.xml in version control (e.g., .gitignore exceptions for runtime/).config/dload.php for environment-specific overrides (e.g., dev vs. prod binaries).composer.json to avoid unexpected updates:
"require-dev": {
"internal/dload": "^1.0"
}
dload:update Artisan command to check for new versions:
php artisan dload:update --check-only // Dry run
php artisan dload:update // Update all binaries
monolog):
Dload::setLogger(app('log')->channel('dload'));
dload.md section to Laravel’s README.md with:
composer require internal/dload).How can I help you explore Laravel packages today?