-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Description
CallableResolver call is wrapped in a catch that expects RuntimeException
Slim/Slim/MiddlewareDispatcher.php
Lines 214 to 222 in 8294d20
| if ($this->callableResolver instanceof CallableResolverInterface) { | |
| try { | |
| $callable = $this->callableResolver->resolve($this->middleware); | |
| } catch (RuntimeException $e) { | |
| // Do Nothing | |
| } | |
| } | |
| if (!$callable) { |
If a resolver throws exception that doesn't extend from RuntimeException this halts the execution and fallback code below is never reached.
Real example of the issue with third party resolver: PHP-DI/Slim-Bridge#51
I am not sure what's the reasoning for specifically RuntimeException here, but broadening it to Exception might be a good idea for resilience?