Closed danae closed 2 years ago
Hmm, I think injecting second resolver might be overkill for the problem. MiddlewareDispatcher->addDeferred()
already has the logic to handle this, if provided resolver failed. See
https://github.com/slimphp/Slim/blob/8294d20e016b01ba57eb2cdb8c0f59cde502d1ab/Slim/MiddlewareDispatcher.php#L214-L237
The current issue is that Invoker throws exception that Slim doesn't expect and catch there, so fallback code is never reached.
Might throwing the expected exception and letting Slim get on with it be a lighter solution?
Possibly might be better improved upstream too, opened an issue there https://github.com/slimphp/Slim/issues/3071
Thank you, we've merged #71 instead.
Fixes #51 by using the code supplied by kakenbok in https://github.com/PHP-DI/Slim-Bridge/issues/51#issuecomment-820936631. Added a test case that passes as well.