#1605·hanami

Idea: allow user registration of substitute provider sources

Author: timrileyCreated Jun 21, 2026Updated Jun 21, 2026

[!NOTE] This is an idea for a future release, not an issue I want worked on immediately.

If someone wanted to e.g. customise our built-in :mailers provider and have it apply to every slice in an app, the cleanest way to do this would be by providing a provider source as a substitute for the one we have built in.

We could expose this as app-level config, to ensure the changes are limited to the app, rather than global. Something like this:

config.provider_sources[:mailers] = MyMailers

Then we'd need to change our internal providers to find the provider source from this config rather than hard-coding it to our built-in provider source class.

(Dry System already has its own provider source registry, which we should also consider, but I think it might be better to bypass it here for the purposes of keeping everything contained to a single app's config).