> Btw, don't we miss an "InvalidArgumentException", to be thrown when the 
arg passed to has/get is not a string?

It has as much value as documenting `@throws \Error` (compare it with 
scalar type hints).

On Sunday, January 15, 2017 at 5:40:10 PM UTC+3, Nicolas Grekas wrote:
>
>
>
> Regarding you last suggestion I'm having trouble seeing the difference 
>> with the current version of the spec, could you pinpoint it more explicitly?
>>
>
>
> There are two differences:
>
> The most important one is that the *wording* of the PSR need to be as 
> clear as possible. Finding a clear way to express things, so that the PSR 
> is self explanatory enough, is a must (the answers on the ML will be lost 
> in history.)
>
> The second one is a really technical consequence I didn't realize when 
> writing the previous comment:
>
> It makes this statements useless (which is a good thing since that's the 
> one we're worried about):
>
> > 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 the 
> NotFoundExceptionInterface.
>
> If one wants to be able to really differentiate these situations, one can 
> already do:
>
> just check "has" before "get". If, after doing so, "get" throws a 
> NotFoundExceptionInterface, then it's a second level missing dep. Isn't 
> it?
>
>
> Btw, don't we miss an "InvalidArgumentException", to be thrown when the 
> arg passed to has/get is not a string?
>
> Nicolas
>

-- 
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 
https://groups.google.com/d/msgid/php-fig/ebba4447-f61a-4cfc-a9d8-11a1fc604e38%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to