You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: