On 03.02.2011, at 17:01, Jeremy Mikola wrote:

> Just wanted to share this here and solicit some feedback:
> 
> https://github.com/fabpot/symfony/pull/575
> 
> Without repeating the pull request comments word-for-word, here are two 
> points:
>       • The factory-method property currently used either factory-service or 
> class (in the absence of factory-service).  Class is also used for inferring 
> the class of the service itself, so this was ambiguous for factories that 
> don't also return instances of themselves.  Having an explicit factory-class 
> property removes the ambiguity and also makes the validation simpler.

As a user I wasnt really concerned about this, but I guess especially for the 
reason why class is mandatory it makes sense to separate the two?

>       • While implementing this, I noticed that interface injection is 
> ignored for factory-generated services.  Johannes commented that there's no 
> problem appending method calls to factory-generated service definition, so we 
> can probably remove this limitation.  I would suggest doing that in a 
> separate pull request / enhancement.

OK.

Which reminds me, one of my concerns with interface injection is that it 
injects the same service to any class implementing the given interface with no 
way to individually override this. So I have been thinking if it would make 
sense to add something to the DIC to detect if the same setter defined by an 
interface is explicitly listed in the call section of the given service and in 
that case only use the explicit setter call and not the implicit one from the 
interface injection.

This way interface injection would retain its convenience, but would still 
allow customization on a case by case basis.

regards,
Lukas Kahwe Smith
[email protected]



-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to