mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-11-11 06:38:26 +00:00
Add configuration option to select storage driver
Introduces a new `use_driver` configuration option to specify the desired storage driver (`local_storage` or `openstack`). Ensures proper validation to handle multiple drivers and throws appropriate errors when configurations are inconsistent or missing. Refactors related logic to improve clarity and maintainability.
This commit is contained in:
@@ -30,6 +30,10 @@ class Configuration implements ConfigurationInterface
|
||||
|
||||
/* @phpstan-ignore-next-line As there are inconsistencies in return types, but the code works... */
|
||||
$rootNode->children()
|
||||
->enumNode('use_driver')
|
||||
->values(['local_storage', 'openstack'])
|
||||
->info('Driver to use. Default to the single one if multiple driver are defined. Configuration will raise an error if there are multiple drivers defined, and if this key is not set')
|
||||
->end()
|
||||
->arrayNode('local_storage')
|
||||
->info('where the stored object should be stored')
|
||||
->children()
|
||||
|
||||
Reference in New Issue
Block a user