spatie/laravel-health
Monitor your Laravel app’s health by registering configurable checks (disk space, queues, cache, etc.). Get warnings or failures and receive notifications via mail or Slack, with an easy API for adding custom checks and reporting status.
Pros:
1.39.3 includes critical dependency updates to resolve security vulnerabilities (e.g., rebecca-canyon's PR #314), aligning with Laravel’s security-first philosophy. No architectural changes required.Cons:
composer validate.HealthResultStore still requires careful handling of concurrent writes or restarts with InMemoryHealthResultStore.Low Risk:
composer update spatie/laravel-health --with-dependencies
laravel/slack-notification-channel compatibility unchanged).Potential Challenges:
spatie/laravel-package-tools) may conflict with other Spatie packages or Laravel core. Test with:
composer why-not spatie/laravel-health
.env for compliance.Minor Risks:
composer audit
/health-check route with:
curl -X GET http://your-app.test/health-check -H "Authorization: Bearer $OH_DEAR_SECRET"
Critical Risks:
DatabaseHealthResultStore remain a risk. Mitigate with transactions or Redis caching.Security Compliance:
Dependency Conflicts:
spatie/laravel-package-tools or other dependencies conflict with existing Spatie packages (e.g., laravel-permission)?composer.lock be committed to freeze dependencies post-update?Alerting Reliability:
Oh Dear Integration:
Custom Check Validation:
create_function)?Rollback Plan:
1.39.2) be retained temporarily for rollback?Laravel Ecosystem:
spatie/laravel-package-tools and related packages ensure compliance with Laravel’s security advisories.laravel/notifications.CacheHealthResultStore continues to integrate with Laravel’s cache drivers (Redis, Memcached).Non-Laravel Considerations:
/health-check.Pre-Update Audit:
composer audit to identify existing vulnerabilities.eval, dynamic function calls).Update Process:
composer update spatie/laravel-health --with-dependencies
php artisan health:checks
php artisan cache:clear && php artisan config:clear
Security Validation:
.env for secrets (e.g., OH_DEAR_HEALTH_CHECK_SECRET, Slack webhook URLs).curl -v http://your-app.test/health-check -H "Authorization: Bearer $OH_DEAR_SECRET"
Custom Checks:
mysql_connect).#[HealthCheck]
class CustomApiCheck extends Check { ... }
Post-Update Monitoring:
openssl for HTTPS).Phase 1: Security Validation
Phase 2: Custom Check Updates
Phase 3: Performance Optimization
artisan schedule:run) for performance.CacheHealthResultStore) if checks are resource-intensive.Phase 4: Observability Enhancement
/health route with Laravel’s Route::get).Pros:
1.39.3 includes security-focused updates, indicating ongoing support. Roadmap aligns with Laravel’s LTS cycles.config/health.php remains valid.composer update with --with-dependencies ensures transitive dependencies are secured.Cons:
spatie/laravel-package-tools). Monitor with:
composer why spatie/laravel-health
env management.How can I help you explore Laravel packages today?