- How do I install liip/monitor in a Laravel application?
- You can try composer require liip/monitor, but expect platform constraint failures on PHP 8.2 or 8.3 because the last release was in 2014. There is no Laravel service provider, config publish, facade, route, or artisan command, so installation does not give you a working monitor endpoint. Use --ignore-platform-reqs only for a short evaluation, not in production, and prefer a maintained Laravel health package or an in-house check runner.
- Does liip/monitor support Laravel 10, 11, and 12?
- No. The package predates modern Laravel and has no official Laravel integration surface, and it is archived with no maintainer triage or upgrade path. Laravel 11 already ships a built-in health route via health: '/up' in bootstrap/app.php, and spatie/laravel-health is the ecosystem-standard replacement. Treat liip/monitor as a vocabulary reference for Check, Result, Status, Group, and Runner, not as a runtime dependency.
- What built-in checks does liip/monitor provide for database, cache, and storage?
- Conceptually it covers database, cache, storage, queue, disk space, and similar checks, but the implementation is Symfony-era and its optional checks reference old dependency versions. It does not ship Laravel-ready database, Redis, Horizon, or S3 checks. For Laravel, spatie/laravel-health provides those checks with a JSON endpoint and result history, or you can write small HealthCheck classes tagged in a service provider.
- How do I add a custom check with liip/monitor?
- The package pattern is a CheckInterface whose check method returns a Result containing a status and message, plus a Runner that registers checks into named groups and aggregates results. In Laravel you would map that to an App\Support\Health\HealthCheck contract, tag implementations as bindings in a service provider, and inject them into a controller. Do not depend on the archived package code; reimplement the roughly three-class API in about a day.
- How do I configure the monitor route, middleware, and authentication in Laravel?
- liip/monitor does not provide Laravel routes, middleware, or authentication, so every binding is yours to build. Create a HealthController, register the route outside the web and auth middleware groups, and optionally protect it with a signed URL or IP allowlist. Keep the endpoint cheap and avoid synchronous DB, Redis, or queue checks under aggressive orchestrator polling.
- Is liip/monitor safe to use in production?
- No. It is archived, unmaintained since 2014, and receives no security patches or PHP 8 fixes. A latent fatal error inside a check can take down the health endpoint precisely when you need it during an outage, and a green health response that only asserts PHP is running gives false confidence. The MIT license is clean and the code volume is small, but the runtime risk is not worth it.
- What does the liip/monitor JSON response look like?
- The design returns a machine-readable status and message per check, aggregated by the Runner into named groups, using a status vocabulary such as OK, WARNING, CRITICAL, and UNKNOWN. The package does not include a Laravel JSON endpoint or output format, so you define the response shape in your controller. If you also run a legacy Symfony app with liip/monitor-bundle, keep the same status vocabulary so one dashboard can consume both.
- What are the best alternatives to liip/monitor for Laravel health checks?
- For basic liveness and readiness, use Laravel 11's built-in health route configured as health: '/up'. For deeper checks, spatie/laravel-health is actively maintained and ships database, Redis, cache, Horizon, queue, disk, and HTTP checks with a JSON endpoint and result history. A thin in-house health module with tagged HealthCheck bindings and Cache-backed results is also a reasonable fit for Laravel 10, 11, and 12.
- Can I use liip/monitor with PHP 8.3, Laravel Pint, and PHPStan?
- Almost certainly not without heavy patching. The code predates PSR-4 and PSR-12 norms, likely lacks return types, uses dynamic properties, and contains PHP 5.4-era idioms, so PHPStan and Pint would flag many issues. Composer install will likely fail platform constraints, and ignoring them imports a legacy transitive tree for functionality you can reimplement cleanly.
- How do I test health checks in a Laravel test suite if I adopt the liip/monitor pattern?
- Since there is no Laravel integration to test, write feature tests that hit your own health endpoint and assert the JSON status codes and group names. Use RefreshDatabase and fake cache, queue, and storage drivers so checks stay fast and deterministic, and avoid synchronous external API calls in tests. You can also unit test each HealthCheck implementation in isolation by asserting the returned Result status and message.