monsieurbiz/healthcheck-bundle
Health check endpoints for Sylius applications. Exposes lightweight HTTP routes that report application and service status, so monitoring tools and load balancers can confirm your store is up and dependencies like the database are reachable.
This package answers health probes (load balancers, Kubernetes liveness/readiness, uptime monitors) from inside your application without going through your normal routing stack.
routes/healthcheck.php-style import (or bundle route file import) you added previously — the route layer is gone in 1.1.0.HEALTHCHECK_PATH (falls back to the documented default when unset). Values are treated as literal paths and normalized, so /health and health behave the same, but don't include a query string.HEALTHCHECK_PATH — it is resolved during container compilation, not per request. In Laravel terms: php artisan optimize:clear (or at minimum config:clear) after changing it, and in Docker/Kubernetes make sure the variable is present at build/boot time rather than only in a .env loaded later.curl -i https://your-app.test/health → expect 200 for HEAD and GET when all checks pass, and a non-2xx when a check returns false.Start by reading the package's check interface/tag documentation and its listener registration — those two files tell you everything about how probes flow through your app.
Boolean checks, tagged and cheap. Day-to-day usage is writing small classes/services that implement the package's check contract and return true/false, then registering them with the tag the bundle looks for. Keep them fast and dependency-light: a probe fires on every poll interval, so a check that hits a cold database pool or an external API every 5 seconds will hurt. Typical checks: cache reachable, queue connection alive, storage writable, a critical read query succeeds.
Custom HTTP exceptions for degraded states. Instead of returning a plain false and a generic 500, throw a custom HTTP exception from a check (or from your own wrapper) to map a failing subsystem to 503 with a meaningful body. This preserves the package's failure-logging behaviour while giving your orchestrator something actionable.
Don't build routes for it anymore. Because 1.1.0 handles kernel.request at PHP_INT_MAX, the probe is intercepted before routing, security, channel, and locale listeners run. That's the feature: your health endpoint works when the router, session, auth, or locale stack is broken. So:
route('healthcheck') calls — named route-based URL generation is no longer provided. Build URLs with url('/'.ltrim(config('...'), '/')) or a plain config value.routes/web.php and out of CSRF/session considerations entirely.Environment-specific paths. Set HEALTHCHECK_PATH per environment (e.g. /health in production behind the LB, /_probe in staging to avoid public scanners). Because it's compile-time, treat it like a build-time configuration value — bake it into the image or pass it as a real environment variable — rather than something you flip at runtime.
Integration fit. In Kubernetes, point both liveness and readiness at the same path and let the checks distinguish (fast checks for liveness, dependency checks for readiness). In Laravel, avoid layering your own Route::get('/health') on top — a duplicate route will never be reached and only confuses future readers.
route('healthcheck') (or whatever the old route name was) now throws RouteNotFoundException. Grep for it during the upgrade; replace with a URL built from the configured path.HEALTHCHECK_PATH without rebuilding the container leaves the old path live. If /health 404s after a change, clear cached config/container first, don't debug the listener..env may not exist at compile time. The path is read from "the first present environment source during compilation" — so the precedence order matters. If your value only lives in .env (loaded after container compilation), it may be ignored. Prefer real process environment variables (docker run -e, Kubernetes env, CI secrets) for this one setting.POST /health will behave like any unknown route (404/405). Don't rely on the probe path accepting anything else.false or throw the package-supported custom HTTP exception so failure logging records something useful.debug:event-dispatcher / container dump) → confirm the compiled path value → curl -I for HEAD and curl -i for GET → check your app log channel for the package's failure entries. Also verify no legacy Route::get('/health', ...) remains to muddy the picture.route() call sites.How can I help you explore Laravel packages today?