Download the PHP package tourze/health-check-bundle without Composer
On this page you can find all versions of the php package tourze/health-check-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tourze/health-check-bundle
More information about tourze/health-check-bundle
Files in tourze/health-check-bundle
Package health-check-bundle
Short Description Symfony应用程序健康检查组件,支持SQL检查、内置扩展检查等多种健康状态监控功能
License MIT
Informations about the package health-check-bundle
Health Check Bundle
中文
[]
(https://packagist.org/packages/tourze/health-check-bundle)
[
]
(https://github.com/tourze/health-check-bundle/blob/master/LICENSE)
[
]
(https://travis-ci.org/tourze/health-check-bundle)
[
]
(https://codecov.io/gh/tourze/health-check-bundle)
A concise and efficient health check bundle for Symfony, supporting various check types for service monitoring and automated operations.
Features
- Custom SQL health checks with flexible configuration
- Built-in checks for directory permissions, disk usage, PHP extensions, etc.
- Cron expression support for scheduled checks
- Summary and visualization of check results
- Easily extensible with custom checkers
Installation
Quick Start
-
Register the bundle in your Symfony project:
- Auto-discovery or add to
config/bundles.php:
- Auto-discovery or add to
- Configure database connection and ensure the
health_sql_checkertable is created. -
Run health checks:
- Review the summary output in the terminal.
Advanced Usage
Custom Health Checkers
Create custom health checkers by implementing the CheckInterface:
SQL Health Checks
SQL health checks allow you to monitor database conditions:
Security
Data Protection
- SQL queries are parameterized to prevent injection attacks
- Access to health check endpoints should be restricted in production
- Sensitive health check results should not be exposed publicly
Best Practices
- Regular security audits of custom health checkers
- Monitor health check logs for suspicious activities
- Use environment-specific configurations for different deployment stages
Dependencies
Requirements
- PHP 8.1+
- Symfony 7.3+
- Doctrine ORM, Laminas Diagnostics, and related dependencies
Core Dependencies
doctrine/orm^3.0 - For entity management and database operationslaminas/laminas-diagnostics^1.27 - Core health check functionalitysymfony/framework-bundle^7.3 - Symfony framework integrationdragonmantank/cron-expression^3.4 - Cron expression parsing
Internal Dependencies
tourze/bundle-dependency- Bundle dependency managementtourze/doctrine-indexed-bundle- Database index managementtourze/doctrine-timestamp-bundle- Timestamp management for entitiestourze/doctrine-track-bundle- Entity tracking functionalitytourze/doctrine-user-bundle- User attribution for entitiestourze/enum-extra- Enhanced enum functionality
Documentation
- Add custom checks by implementing
Laminas\Diagnostics\Check\CheckInterface - SQL checks can be configured in the admin panel or directly in the database
- Built-in checkers include:
- Directory Permission Check: Verifies cache, logs, and data directory write permissions
- Disk Usage Check: Monitors available disk space
- PHP Extension Check: Ensures required PHP extensions are loaded
SQL Checker Configuration
| Field | Description |
|---|---|
| name | Check name |
| sql | SQL to execute |
| cronExpression | Cron expression |
| operator | Operator (>, >=, <, <=, =, !=) |
| compareValue | Value to compare |
| remark | Remark |
| valid | Is enabled |
Contributing
- Issues and PRs are welcome
- Follows PSR coding standards; must pass phpstan/phpunit tests
- See main repository for detailed contribution guide
License
- MIT License
- © tourze
Changelog
See CHANGELOG
All versions of health-check-bundle with dependencies
doctrine/dbal Version ^4.0
doctrine/doctrine-bundle Version ^2.13
doctrine/orm Version ^3.0
doctrine/persistence Version ^4.1
dragonmantank/cron-expression Version ^3.4
easycorp/easyadmin-bundle Version ^4
knplabs/knp-menu Version ^3.7
laminas/laminas-diagnostics Version ^1.27
symfony/config Version ^7.3
symfony/console Version ^7.3
symfony/dependency-injection Version ^7.3
symfony/doctrine-bridge Version ^7.3
symfony/framework-bundle Version ^7.3
symfony/http-foundation Version ^7.3
symfony/http-kernel Version ^7.3
symfony/property-access Version ^7.3
symfony/security-bundle Version ^7.3
symfony/security-http Version ^7.3
symfony/yaml Version ^7.3
tourze/bundle-dependency Version 1.*
tourze/doctrine-indexed-bundle Version 1.0.*
tourze/doctrine-timestamp-bundle Version 1.1.*
tourze/doctrine-track-bundle Version 1.1.*
tourze/doctrine-user-bundle Version 1.0.*
tourze/easy-admin-enum-field-bundle Version 1.0.*
tourze/easy-admin-menu-bundle Version 1.0.*
tourze/enum-extra Version 1.0.*
tourze/symfony-dependency-service-loader Version 1.0.*