Symfony/Laravel Compatibility:
symfony/http-kernel for HTTP checks, symfony/process for CLI/daemon validation).symfony/scheduler, security-http) are irrelevant to Laravel but can be abstracted away if only the runtime-check logic is extracted.Core Value Proposition:
ext-posix, misconfigured FPM sockets).Laravel-Specific Challenges:
DependencyInjection extensions would need adaptation (e.g., via Laravel’s ServiceProvider or Package system).symfony/event-dispatcher) isn’t natively in Laravel, but checks could trigger Laravel’s events or commands.FastCGIClient. Laravel’s built-in server (e.g., php artisan serve) wouldn’t need this, but production servers (Nginx/Apache + FPM) would.Workarounds:
RuntimeCheck, FpmCheck) as standalone PHP libraries, bypassing Symfony dependencies.Illuminate\Support\Facades\Process instead of symfony/process).| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Symfony Dependency Bloat | High | Isolate checks to avoid pulling in Symfony. |
| Laravel Container Conflicts | Medium | Use Laravel’s extend() or alias() for DI. |
| FPM-Specific Checks | Medium | Skip FPM checks in non-FPM environments. |
| PHP 8.1+ Requirement | Low | Laravel 10+ supports PHP 8.1+. |
| Monolog Integration | Low | Laravel’s logging is Monolog-compatible. |
php artisan optimize, custom health routes) or augment them?Laravel Compatibility:
Process facade for CLI commands).scheduler, security-http).Dependency Overlap:
monolog/monolog (Laravel uses it), symfony/process (replaceable with Illuminate\Support\Facades\Process).Illuminate\Contracts\Console\Kernel for CLI checks.Illuminate\Http\Middleware for HTTP-based validations.Phase 1: Proof of Concept (PoC)
RuntimeCheck, ExtensionCheck) into a standalone Laravel package.symfony/process → Process::of()hollodotme/fast-cgi-client → Custom FPM socket checker (if needed).Phase 2: Integration
bootstrap/app.php or a ServiceProvider.laravel-runtime-check) that depends on atoolo/runtime-check-bundle internally but exposes a Laravel-friendly API.vendor/bin/runtime-check).Phase 3: Deployment
php artisan runtime:check./runtime-check endpoint).| Component | Laravel Equivalent | Notes |
|---|---|---|
symfony/process |
Process::of() (Laravel 10+) |
Identical API. |
monolog/monolog |
Illuminate\Log |
Drop-in replacement. |
symfony/lock |
Illuminate\Cache (with mutex) |
Use Cache::lock() for distributed locks. |
symfony/http-foundation |
Illuminate\Http |
Avoid; use Laravel’s native HTTP layer. |
| FPM Socket Checks | Custom File/Socket checks |
Skip if not using FPM. |
bootstrap/app.php before the framework initializes.$runtimeCheck = new \Atoolo\RuntimeCheckBundle\RuntimeCheck();
if (!$runtimeCheck->checkAll()) {
throw new \RuntimeException('Runtime checks failed!');
}
php artisan runtime:check for manual/automated validation.RuntimeCheckMiddleware to validate requests (e.g., for API health checks).Illuminate\Foundation\Bootstrap\RegisteredProviders.composer.json.README.How can I help you explore Laravel packages today?