db provider should configure gateway URLs from parent
Author: timrileyCreated Aug 21, 2026Updated Aug 21, 2026
Right now configure_from_parent works on everything except gateways. This arrangement presupposed that people would be putting database URLs into their ENV, since gateways are later created based on the presence of those ENV vars. But if you're configuring a database_url explicitly (not from env) in the parent provider, then you end up with errors like this in a slice:
Hanami::Providers::DB#configure_gateways': A database_url for gateway default is required to start :db. (Hanami::ComponentLoadError)We should look at copying database URLs from parent gateways if none exist in the ENV. We should have a play to figure out whether it's better to copy parent gateways URLs or after we look in the ENV. Test this against a few setups to make sure it holds up.
Source: hanami/hanami