> Just like @mwop, I've never had an issue with this behaviour.
> Actually, I'd be interested in knowing what is your concern with this? Do 
you have an actual use case in mind that absolutely requires the container 
to always return the same value for all entries?

A simple example is an event dispatcher. If I register a listener on one 
instance of the dispatcher and trigger an event on another instance of the 
dispatcher, my registered listeners will not be called. Again, this is an 
application concern, not a framework concern and it could be argued that 
this kind of issue is out-of-scope for this PSR.

But overall, I agree with Hari that the main use case for a container is to 
instance the service once and always return the same instance on further 
calls. If you retrieve new instances from your container on each call, your 
container is acting like a simple factory, not as a service 
container/dependency injection container.

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/2c879363-54ca-4723-8a6e-01c1c9917718%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to