Closed JEDIBC closed 8 years ago
Symfony 3.2 will have setter injection support for autowiring. IMO it handles the same use case. WDYT?
Looks fine for me as long as you activate the autowireSetter
flag in DunglasActionExtension
@JEDIBC yes it's planned!
Hi,
As there already is a
ContainerAwareInterface
injection in theDunglasActionExtension::registerClass()
method, why not pushing it to the next level ?The idea is to define in the configuration a list of
*AwareInterface
with the propersetter
and containerid
to register the injection.It will prevent the contructor boilerplate (most of the time) and is a convenient way of injecting dependancies & code snippets.
Interface example :
Corresponding Trait:
Configuration :