Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added health/info for migrations bundle #2

Merged
merged 2 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,24 @@ sym_sensor_actuator_doctrine:
default:
service: doctrine.dbal.default_connection
check_sql: SELECT 1

migrations:
enabled: true
check_unavailable: true
report_unavailable_as_down: false
```

Following table outlines the configuration:

| key | default | description |
| --------------------------------------------------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| sym_sensor_actuator_doctrine.connections | Array | Contains a list of names, where each represents an connection to e database. The name itself can be chosen at will |
| sym_sensor_actuator_doctrine.connections.`name`.enabled | true | If the connection associated with this name should monitored |
| sym_sensor_actuator_doctrine.connections.`name`.service | 'Doctrine\DBAL\Connection' | The service name inside the dependency injection container. You can lookup your connection name with `bin/console debug:container` |
| sym_sensor_actuator_doctrine.connections.`name`.check_sql | 'Select 1' | The SQL which will be executed to determine if the database is up. The response will be ignored, it only matters if the sql can be executed without error. If you set this to `~` it will only check if a connection to the database can be established |
| key | default | description |
| ------------------------------------------------------------------ | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| sym_sensor_actuator_doctrine.connections | Array | Contains a list of names, where each represents an connection to e database. The name itself can be chosen at will |
| sym_sensor_actuator_doctrine.connections.`name`.enabled | true | If the connection associated with this name should monitored |
| sym_sensor_actuator_doctrine.connections.`name`.service | 'Doctrine\DBAL\Connection' | The service name inside the dependency injection container. You can lookup your connection name with `bin/console debug:container` |
| sym_sensor_actuator_doctrine.connections.`name`.check_sql | 'Select 1' | The SQL which will be executed to determine if the database is up. The response will be ignored, it only matters if the sql can be executed without error. If you set this to `~` it will only check if a connection to the database can be established |
| sym_sensor_actuator_doctrine.migrations.enabled | true | If the migration check should be enabled in health / info endpoint |
| sym_sensor_actuator_doctrine.migrations.check_unavailable | true | If the health endpoint should check the unavailable migrations |
| sym_sensor_actuator_doctrine.migrations.report_unavailable_as_down | false | If unavailable migrations should count as unknown or down |


## License
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
"license": "MIT",
"require": {
"symfony/framework-bundle": "^6.0",
"symsensor/actuator-bundle": "^1.0",
"doctrine/doctrine-bundle": "^2.0"
"symsensor/actuator-bundle": "^1.0.1"
},
"require-dev": {
"doctrine/doctrine-bundle": "^2.0",
"doctrine/doctrine-migrations-bundle": "^3.2",
"friendsofphp/php-cs-fixer": "^3.22",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-symfony": "^1.1",
Expand Down
Loading