mtdowling/burgomaster
Laravel package for controlling and monitoring long-running background tasks and daemons. Provides a simple master/worker process manager, status reporting, and a structured way to start, stop, and supervise job runners from your app or CLI.
phar:// paths, complicating Laravel’s debugbar or telescope.phar.readonly=0 (disabled by default in many PHP configs).phar://stub.txt)..env files cannot be bundled (use --exclude=.env and pass configs at runtime).composer install before packaging).burgomaster package --include=public/).burgomaster package in workflows.dump-autoload: Simpler for traditional deployments.humbug/box).| Risk | Severity | Mitigation |
|---|---|---|
| PHAR Security Vulnerabilities | High | Enforce signing (--sign), validate signatures on load, and disable phar.readonly only in trusted environments. |
| Laravel Incompatibility | Medium | Use PHARs only for non-web components (CLI tools, libraries). |
| Debugging Complexity | Medium | Maintain a non-PHAR dev branch and use phar://-aware Xdebug configs. |
| Dependency Bloat | Low | Exclude unused vendors via composer.json autoload.files. |
| CI/CD Friction | Low | Cache PHAR builds between runs to reduce rebuild times. |
phar.readonly=0)?php my-command.phar migrate).php payment-gateway.phar:process).phar://api.phar).eval or class_alias).Pilot Phase (2–4 Weeks):
composer require mtdowling/burgomaster.phar://stub.txt) to register the command:
<?php
if (php_sapi_name() === 'cli') {
require __DIR__ . '/vendor/autoload.php';
$command = new \App\Console\Commands\MyCommand();
$command->handle();
}
burgomaster create my-command.phar --stub=phar://stub.txt --main=vendor/bin/my-command
Incremental Rollout:
burgomaster create my-library.phar --exclude=app/,config/,resources/
bootstrap/cache/ (generated files).storage/ (runtime data)..env (environment configs).# GitHub Actions Example
- name: Build PHAR
run: burgomaster create my-app.phar --sign --signer=key.pem
- name: Validate PHAR
run: php -r "if (!phar_validate_signature('my-app.phar')) exit(1);"
Fallback Plan:
| Laravel Component | Compatibility Notes |
|---|---|
| Artisan Commands | ✅ Supported: Register commands in the PHAR stub. |
| Service Providers | ⚠️ Partial: Must be manually loaded in the stub (cannot use Laravel’s container). |
| Eloquent Models | ❌ Not Supported: PHARs cannot dynamically load database configs. |
| Blade Views | ❌ Not Supported: Requires runtime template compilation. |
| Middleware | ❌ Not Supported: PHARs are stateless; middleware relies on Laravel’s pipeline. |
| Queues/Jobs | ⚠️ Partial: Can bundle workers, but database configs must be external. |
| API Routes | ❌ Not Supported: PHARs cannot handle HTTP requests (use CLI tools instead). |
| Frontend Assets | ✅ Supported: Bundle with --include=public/ or Laravel Mix. |
eval, class_alias)..env, bootstrap/cache/).composer.json:
{
"scripts": {
"post-autoload-dump":
How can I help you explore Laravel packages today?