|
|
|
|
|
by hudo
3058 days ago
|
|
Configuration can come from different sources, it can be reloaded, it can be lazy-loaded, there are so many different reasons why config is more like service and not a static variable.
It has to be injected.
Maybe you're using it in a way static access makes sense, but when you're designing generic Configuration solution, its whole another set of problems, requirements and constraints. |
|
There is a case for a mutable config, but it should be a separate class, and still wouldn't need to be a service.