-
-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Currently the DI component only supports constructor injection. This is usually preferred/is more common, but supporting setter injection would also be nice to have. Esp when used in conjunction with modules and auto configuration. E.g. have a module of some type that when included into a service automatically registers a setter injection call on the service as well as defining the property/setter for it. This can work quite well for services that are optional versus littering the constructor with many nilable properties.
Marking this as blocked by crystal-lang/crystal#8835 just due to the complexities around resolving arguments. Being able to share/reuse that logic would make this much much easier to implement w/o making the code much much less readable.