I have Expressive application running on multiple servers (on each server is one instance). I would like to have an ability of changing (overriding) some options in container config service in my application gui.
I really dont know how to solve this.
I cant create delegator factory - because config is a service
I cant create config aggregator provider - because service container is not built
I suggest setting environment variables in each server, and then accessing them via getenv() within your configuration files. This will work for any scalar option you have.
I should be more precise in my question. Use case:
My application creates invoices. Default seller info is in config service.
These info is then injected to invoice generator in factory.
I think config shall be used for immutable or default values only. Why not go for setter method? InvoiceGenerator is obviously not a value object, so why would you not want to have a setter for seller?