Skip to content

Commit

Permalink
Merge pull request #2 from SymSensor/add_migration_bundle
Browse files Browse the repository at this point in the history
Added health/info for migrations bundle
  • Loading branch information
Kevin Studer authored Aug 11, 2023
2 parents 66d3976 + 72b4680 commit a7714ed
Show file tree
Hide file tree
Showing 8 changed files with 2,310 additions and 1,945 deletions.
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

0 comments on commit a7714ed

Please sign in to comment.