- Can I use smartassert/health-check-bundle in a Laravel application?
- No, not directly. It is a Symfony bundle that boots through Symfony's Kernel, bundles.php registration, a DI extension, and a routing loader, none of which exist in Laravel. Composer-installing it into Laravel would pull in symfony/framework-bundle, symfony/http-kernel, and symfony/routing without providing a working endpoint. The reusable idea is the check interface and aggregator, which you would need to extract or reimplement under a Laravel service provider.
- What Laravel versions does smartassert/health-check-bundle support?
- None. The package targets Symfony, and its documented integration points are Symfony-specific. There is no Laravel service provider, facade, config file, or route registration for any Laravel version. For current Laravel releases, use a Laravel-native health package such as spatie/laravel-health instead.
- How do I install smartassert/health-check-bundle in a Symfony application?
- Install it with Composer, then register the bundle in config/bundles.php. Tag your check services with the health_check tag so the compiler pass can collect them, and make sure the bundle's routing loader is enabled so the health endpoints are exposed. The integration surface is small, so a working endpoint is typically half a day to a day of work. Keep the routes behind your firewall because the bundle delegates access control to the host application.
- What is a good Laravel alternative to smartassert/health-check-bundle?
- spatie/laravel-health is the practical Laravel-native choice and avoids dragging Symfony framework components into your app. If you only need a simple endpoint, a small controller plus Laravel's database and Redis connections may be enough. Building a thin in-house package around a check interface and aggregator is also viable and takes roughly one to three engineer-days.
- How do I add a custom health check to smartassert/health-check-bundle?
- Implement the bundle's health-check interface, return its result object, and register the class as a service tagged health_check. The compiler pass collects tagged services into the aggregator, which maps results to an HTTP status. Because the interface is maintained by a single primary consumer, pin the version and add your own adapter tests before relying on it.
- What response format do the health-check endpoints return, and does it support liveness and readiness?
- The overview describes checks returning a result object that is mapped to an HTTP status, but it does not document a JSON schema, per-check status codes, or plain-text output. It also does not describe separate liveness and readiness semantics or endpoints. Read the controller and result classes before committing to a monitoring contract, and add tests around the exact status codes your load balancer depends on.
- Are smartassert/health-check-bundle endpoints secure by default?
- Access control is delegated to the host Symfony application's firewall; the bundle itself is not described as adding authentication, IP allowlisting, or token support. That means an exposed health route is as reachable as your firewall allows. Treat health endpoints as security-relevant surface, restrict them to infrastructure, and verify what failure responses reveal before enabling them in production.
- Does smartassert/health-check-bundle support per-check timeouts and failure isolation?
- The overview does not document per-check timeouts or failure isolation, so do not assume a hanging dependency will be cut off automatically. A health endpoint that probes the database or Redis can block for as long as those clients allow. Review the check implementations and wrap external calls with your own timeouts, or add a circuit-breaker layer in the aggregator.
- Is smartassert/health-check-bundle actively maintained and safe for production?
- The package has one star, zero dependents, and a single publishing organization that is also its primary consumer, so there is no third-party production evidence to rely on. Bus factor is one, with no documented contributor bench or BC policy. It may be fine as a reference or for a Symfony app you can read end-to-end, but pin the version and be prepared to maintain a fork.
- How do I migrate smartassert/health-check-bundle health checks to Laravel?
- Do not install the bundle in Laravel. Extract the check interface, the aggregator, and the result-to-HTTP mapping into a small in-house package, then bind it through a Laravel service provider and expose routes under /health and /health/{check}. Reimplement the individual database and Redis checks using Laravel's connections, and run the new endpoint in parallel with existing probes before cutting over. The extraction is thin, typically one to three engineer-days including tests.