chameleon-system/sanitycheck-bundle
Artisan commands, Service Providers, Facades) may obviate some use cases.DiskSpaceCheck, HttpAvailabilityCheck) are reusable but may need Laravel-specific implementations (e.g., using Laravel’s Filesystem, HttpClient, or Process components).Bundle system, so integration would require:
php artisan check:health) to replicate functionality.HttpKernel, Console, and DependencyInjection components. Laravel’s equivalents (e.g., Illuminate\Console, Illuminate\Contracts\Container) would need mapping or shims.EventDispatcher is tightly coupled. Laravel’s Events or Listeners could replace this, but custom logic would be needed for check scheduling (e.g., via Laravel’s scheduler or queue workers).booted() in Service Providers).Artisan or Horizon?laravel-health)?deploy.php)?Notification system, Slack alerts, or UI dashboards?)Bundle with a Laravel ServiceProvider registering checks as singletons.Command classes to Laravel’s Artisan commands (e.g., php artisan sanity:check).EventDispatcher with Laravel’s Events (e.g., CheckFailed event).bind() or make() to resolve check dependencies (e.g., Filesystem, HttpClient).laravel-debugbar, spatie/health).Artisan and scheduler.laravel-sanitycheck) that adapts the core logic.spatie/laravel-health) if functionality overlaps.Database facade or Eloquent integration.Events or Observers.Style interface → Laravel’s Output or custom helpers.Notifiable models (e.g., User::notify(new CheckFailed)).| Phase | Task | Dependencies |
|---|---|---|
| Discovery | Map bundle checks to Laravel needs. | Existing health check tools. |
| Abstraction | Create a SanityCheck facade/class to hide Symfony dependencies. |
PSR-11 container (if not using Laravel DI). |
| Core Integration | Implement checks as Laravel Service Providers. | Laravel’s Filesystem, HttpClient. |
| CLI/W UI | Build Artisan commands or Livewire/Inertia dashboards. |
Laravel’s Console or frontend stack. |
| Scheduling | Set up cron or Laravel scheduler for periodic checks. | app/Console/Kernel.php. |
| Testing | Mock external dependencies (e.g., fake HTTP responses). | Pest/PHPUnit. |
| Deployment | Integrate into CI/CD (e.g., fail builds on critical check failures). | GitHub Actions/GitLab CI. |
HttpKernel may fail in Laravel’s context (e.g., missing Request stack).HttpClient or Illuminate\Http.Debug component may not translate cleanly. Laravel’s Debugbar or Telescope could help.php artisan sanity:check manually).| Failure Scenario | Impact | Mitigation Strategy |
|---|---|---|
| Check fails silently | Undetected system issues. | Log failures to laravel.log + notify via Sl |
How can I help you explore Laravel packages today?