-
-
Notifications
You must be signed in to change notification settings - Fork 240
Description
For the moment, the handler configuration options are all mixed together. This means that it is necessary to validate the options in the extension, even though this is the role of the config tree.
With the introduction of static configuration validation by array shape (and JSON schema?), it would be beneficial for each handler type to have its own configuration. This is already the case for mailer, redis, mongodb, and elasticsearch. We could generalize this with one class per handler, having two methods: one that create the nested config tree and the other that create the handler service definition.
With this approach, we can enable bundles/application to register additional handler types with their own config logic.
This requires a massive deprecation of the existing configuration, we might have some permanent mapping logic to pre-process the configuration.
Inspiration: thephpleague/flysystem-bundle#186