Hey Larry, Let me start by answering your second comment.
The fact that the "delegate lookup feature" was removed from PSR-11 does not make PSR-11 an empty shell. PSR-11 is already useful with or without it. Just have a look at Slim 3, Zend Expressive, Behat or any of the consumers of ContainerInterface <https://github.com/php-fig/fig-standards/blob/master/proposed/container-meta.md#projects-using-containerinterface> for appropriate use cases. - It is useful for routers to fetch a controller from the container. - It is useful for writing adapters extending any containers. - It is useful for composing containers. - It is useful for writing factories that do not depend on a particular container. - In general container-interop has proved the usefulness of the ContainerInterface so it's a shame questionning that again on the last day of the review The delegate lookup feature was mainly removed on the ground that it is a design pattern and therefore not well suited for a PSR. (as a reminder, it's simply the ability for a container to delegate the lookup of dependencies to another container). Nothing prevents any of the containers out there to implement this design pattern while still implementing PSR-11. Also, I'd like to make a parallel with PSR-7 and PSR-15. PSR-7 is already useful by itself, but it will be immensely more useful when PSR-15 passes. It is the same with PSR-11. It will be the cornerstone of interoperable service providers. As soon as PSR-11 passes, we plan forming a working group on standardizing service providers (see https://github.com/container-interop/service-provider/ for more details). PSR-11 is a prerequisite. Regarding your comments on exceptions, I know we disagree on this specific topic. You say: > I find the idea of "Don't define an exception for a > known error case because *I* can't think of a reason you'd catch that" > to be spurious at best. I'd rather say: "Don't standardize an *exception interface* for a known error case because *nobody* can think of a reason you'd catch that" Matthieu asked time and time and time again for a good reason to catch it. Collectively, on the PHP-FIG mailing list, *nobody* was able to give a good use case to catch it. And in more than 2 years of "container-interop" usage, noone ever asked for it. So I'm pretty sure it's safe to say there is no need for it. Regarding your last issue: > There's a formatting issue in the metadoc, 9.3, contributors: Taylor > Otwell is separated from the rest of the group for some reason. I'm > sure there's nothing to be read into that. :-) Poor Taylor! :) I've looked at the markdown file and can't find anything weird there. Unless someone can point me to a mistake I did not see, I believe the error spurs from Github markdown parser that is adding an additional <p> in the <li> of Taylor for no reason. This does not seems to happen with other markdown parsers... anyone would have a workaround for this? ++ David. Le vendredi 13 janvier 2017 00:08:10 UTC+1, Larry Garfield a écrit : > > Late in the week, I know, but this is when I had time. :-( > > One: > > " A call to get can trigger additional calls to get (to fetch the > dependencies). If one of those dependencies is missing, > the NotFoundExceptionInterface triggered by the inner get call SHOULD > NOT bubble out. Instead, it should be wrapped in an exception > implementing the ContainerExceptionInterface that does not implement > theNotFoundExceptionInterface." > > I still find this language unacceptably vague and backward. "Throw > something implementing X but not Y which is a child of X" is needlessly > clumsy. There was, previously, a suggestion to define a > "MissingDependencyException" to use specifically, which is more targeted > than "MisconfiguredServiceException" (and avoids the "breaks how PHP > works" issue that David noted previously). At the very least specifying > that as the exception to throw (which is defined, and therefore we know > it doesn't extent NotFoundException) the above language becomes much > simpler, and for those who do wish to catch it there's a very clear > known value to catch. > > I will be honest, I find the idea of "Don't define an exception for a > known error case because *I* can't think of a reason you'd catch that" > to be spurious at best. It provides for more robust error handling in > some cases, and zero harm in any case. Even if you could argue the > justification for it is small, the justification against it is > non-existent (when limited to just missing dependencies). > > Two: > > I understand the reasons why the delegate lookup was removed outright, > and I do not dispute them. However, the net result is that we have an > interface that is almost trivial, on a topic that is of questionable > appropriateness in the first place. (I still question the validity of a > container interface at all.) That is, with that removed, what's left to > standardize? get() and has() are barely an specification. > > Three: > > There's a formatting issue in the metadoc, 9.3, contributors: Taylor > Otwell is separated from the rest of the group for some reason. I'm > sure there's nothing to be read into that. :-) > > --Larry Garfield > > On 12/31/2016 02:57 PM, Matthew Weier O'Phinney wrote: > > Greetings, on this last day of 2016! (For some of you, it's already > 2017!) > > > > I'm rebooting the REVIEW period for PSR-11 as of now; review will end > > at 11:59 on 13 January 2017, with the possibility of starting a vote > > under the existing FIG 2.0 by-laws possible immediately thereafter. > > > > The changes since the previous review period started include: > > > > - All exceptions were moved into the `Psr\Container` namespace > > (instead of the `Psr\Container\Exception` namespace as was done > > previously). > > > > - Clarifications were added around inclusion of OPTIONAL parameters to > > the `get()` method by _implementing libraries_, noting that doing so > > is allowed by PHP, but discouraged, due to ambiguity in behavior > > between implementations. > > > > - Added a formal definition of an entry identifier for use with > > `get()` and `has()`, noting that these may be any valid non-empty > > string. > > > > - Removed all verbiage around the delegate lookup feature. Consensus > > was that this is an interesting feature, but something that may be > > implemented by libraries while still following the specification. If > > anybody feels the need to formalize this detail, it can be done in a > > later specification without breaking compatibility with the current > > proposal. > > > > We have also rejected the proposed > > `MisconfiguredServiceExceptionInterface`. David has previously noted > > reasons not to include it > > (https://groups.google.com/d/msg/php-fig/2pnhudRUpQg/ewoGoNtFCgAJ), > > which received no rebuttal. We feel it does not add value to consumers > > currently, would likely be problematic in terms of performance, and > > dictates too many details around implementation. > > > > Please review the specification again at this time, and let us know as > > soon as possible if you see any potential problems that remain to be > > addressed. > > > > -- 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/fc315f73-ba20-4b8c-bb22-da8d34f77855%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
