Closed afurculita closed 10 years ago
I still generally favor setter injection to use classes in a more flexible way, e.g. for tests. :smirk: But I'm fine with adding constructors while keeping the setters (unless there's a good reason not to keep them). And the tests should pass...
Are you still working on this?
A Constructor injection is better for Config and ConfigTemplateExtension classes, because they can't operate without the injected arguments. In this case a Setter injection will be an anti-pattern, because the class is not fully initialized and the setters will have to finish the initialization.