spatie/laravel-health).symfony/panther or a custom adapter).Route::get('/health', fn() => response()->json(['status' => 'ok']))) or packages like spatie/laravel-health (10K+ stars), reducing urgency for this bundle.HttpKernel, DependencyInjection, and EventDispatcher—Laravel’s equivalents (e.g., Illuminate\Contracts\Http\Kernel) would need mapping.HealthCheck interface to Laravel’s service container).spatie/laravel-health).HealthCheckInterface and HealthCheckResult makes it non-plug-and-play. A Laravel TPM must decide between:
spatie/laravel-health.symfony/panther) to host the bundle, but this adds complexity.ServiceProvider/Middleware system (high effort).6.0+ (PHP 8.1+). Laravel’s PHP version compatibility must align (e.g., Laravel 10+ supports PHP 8.2).illuminate/http) are leveraged.spatie/laravel-health or native Laravel solutions.// app/Providers/HealthCheckServiceProvider.php
public function register()
{
$this->app->singleton(HealthChecker::class, function () {
return new HealthChecker(
new DatabaseHealthCheck(),
new CacheHealthCheck()
);
});
}
HealthCheck interface (if designing from scratch).ContainerInterface ≠ Laravel’s Container. Use Laravel’s bind() or a bridge like symfony/dependency-injection.health_check route must map to Laravel’s Route::get() or a middleware.HealthCheckEvent would need Laravel equivalents (e.g., Events::dispatch()).spatie/laravel-health) is well-documented and community-backed.| Risk | Mitigation Strategy |
|---|---|
| Bundle breaks due to inaction | Fork and maintain or switch to spatie/laravel-health. |
| Symfony-Laravel integration fails | Isolate health checks in a separate service. |
| Health checks misconfigured | Use Laravel’s Artisan commands for validation. |
| Monitoring tool incompatibility | Standardize on OpenTelemetry or Prometheus metrics. |
| PHP version conflicts | Pin Symfony bundle to a compatible PHP version. |
HealthCheckInterface, event listeners).spatie/laravel-health has comprehensive docs and tests.How can I help you explore Laravel packages today?