> Regarding the *NotFoundExceptionInterface*: > > The current text says a container SHOULD throw an exception. Searching > through the history of container-interop, I cannot find why we put a > "should" here. > I'd like to propose replacing it with a MUST. For instance, it is never ok > if a container returns null instead of throwing an exception. Therefore, > the need for "MUST". Does anyone has any objection regarding this change? >
+1 the current text leaves indeed room for error. > Regarding the *ContainerExceptionInterface*: > > I'd like to make the opposite move and switch from MUST to SHOULD, as in: > "Exceptions directly thrown by the container SHOULD implement the > ContainerExceptionInterface". > Furthermore, I'd like to emphasize the "directly" part. For instance, I > understand perfectly that a cyclic dependency or a config file typo should > throw an exception implementing ContainerExceptionInterface. However, if > the user is using a container based on factories (like Disco or > PimpleInterop), and if the factory written by the user is throwing an > exception, I find it useless to wrap that exception in another exception > implementing the ContainerExceptionInterface. To me, it adds noise and > nothing more. > I have nothing against that, you are welcome to change it. Matthieu -- 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/51420654-2f95-4ce3-b22e-dfba3f6c92fd%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
