As described in the documentation, Silex allows short-circuiting the "before" middleware pipeline when a middleware returns an instance of \Symfony\Component\HttpFoundation\Response.
When using \DI\Bridge\Silex\Application instead of \Silex\Application, this mechanism no longer works.
In the provided example, instead of returning the "expected result" response, the exception is thrown.
As described in the documentation, Silex allows short-circuiting the "before" middleware pipeline when a middleware returns an instance of \Symfony\Component\HttpFoundation\Response. When using \DI\Bridge\Silex\Application instead of \Silex\Application, this mechanism no longer works. In the provided example, instead of returning the "expected result" response, the exception is thrown.
Versions:
"silex/silex": "v1.3.5", "php-di/silex-bridge": "^1.5"
Code example: