I'm not sure how this could be useless, or an edge case.
Like I wrote, the `ParentAwareContainerInterface` would add the concept of 
hierarchy to the standard. This creates the possibility for containers to 
be dependent on other containers for dependency resolution, thus enabling 
lookup delegation. Lookup delegation does not appear to be an edge case, 
since it was talked about quite a bit. It could enable all framework 
components to depend on one single (top-most) container, while at the same 
time hooking in their own standards-compliant containers - completely 
transparent to other modules, and even to other parts of the same module. 
Does this pass as a real use case being used in the wild?
Or are you saying that lookup delegation may not be something that the 
standard needs? I don't really understand, sorry.

On Friday, October 7, 2016 at 6:58:51 PM UTC+2, Xedin Unknown wrote:
> Hi all,
> The delegate lookup feature of Container Interop didn't get as much 
> attention as I feel it deserves. Specifically, it is lacking formalization 
> in PHP - an interface. I started this conversation , but was instructed 
> that the mailing list is the better way to go.
> It seems that many would agree with me in that it would be great to have 
> the standard backed by an interface. There was talk of an interface 
> <https://github.com/container-interop/container-interop/pull/8>, but the 
> idea was shot down due to forcing the implementation to declare a setter. I 
> completely agree that forcing a setter is a bad idea.
> *But why not a getter?*
> * <https://github.com/XedinUnknown/di>*
> *XedinUnknown/di 
> <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2FXedinUnknown%2Fdi&sa=D&sntz=1&usg=AFQjCNGofCA2jo18QAzWcvreAKo22qjoCg>*
>  is 
> an example of an implementation that would achieve lookup delegation while 
> depending on one method of one interface. The rest is implementation 
> details.
> In short, the container that wishes to delegate must pass its parent (or, 
> in my implementation, the "root" parent), if set, to the service definition 
> callable. If the callable is a composite container, it will forward the 
> call to the first child container that contains the definition. Please find 
> a more expanded description in the repo's Readme.
> Looking forward to your comments, questions, or suggestions.

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 php-fig+unsubscr...@googlegroups.com.
To post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to