silpo-tech / health-check-bundle
Health check bundle
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=8.3
- symfony/config: 6.0|^7.0
- symfony/dependency-injection: 6.0|^7.0
- symfony/doctrine-bridge: 6.0 || ^7.0
- symfony/framework-bundle: 6.0 || ^7.0
- symfony/routing: 6.0|^7.0
- symfony/yaml: 6.0 || ^7.0
Requires (Dev)
- doctrine/dbal: 3.9.3
- doctrine/doctrine-bundle: ^2.12
- doctrine/mongodb-odm-bundle: ^5.0
- friendsofphp/php-cs-fixer: ^3.0
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^11.5
- silpo-tech/lib-test-utilities: ^1.0
- symfony/browser-kit: 6.0|^7.0
- symfony/dotenv: 6.0|^7.0
- symfony/filesystem: 6.0 || ^7.0
- symfony/http-kernel: 6.0|^7.0
- symfony/process: 6.0|^7.0
README
About
The Health Check Bundle contains endpoint and services that can be used to check if it is up and running
Installation
Require the bundle and its dependencies with composer:
$ composer require silpo-tech/health-check-bundle
Register the bundle:
// project/config/bundles.php return [ HealthCheck\HealthCheckBundle::class => ['all' => true], ];
Routing:
health_check: resource: '@HealthCheckBundle/Resources/config/routes.yaml'
Configuration:
health_check: apps: # for api web: checkers: - doctrine_mongodb # for workers command: checkers: - doctrine_mongodb
Testing
Run Unit and Integration Tests
composer test:run
Run Full Test Suite (including Application Tests)
For application tests that require database services, you can use Docker Compose:
# Start database services docker-compose -f docker-compose.test.yml up -d # Run all tests including application tests composer test:run # Stop database services docker-compose -f docker-compose.test.yml down
Run Specific Test Suites
# Unit tests only (no external dependencies) php bin/phpunit --testsuite unit # Integration tests only php bin/phpunit --testsuite integration # Application tests only (requires database services) php bin/phpunit --testsuite application