Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for PSR-15 middleware resolving #70

Closed
wants to merge 1 commit into from
Closed

Added support for PSR-15 middleware resolving #70

wants to merge 1 commit into from

Conversation

danae
Copy link

@danae danae commented Apr 17, 2021

Fixes #51 by using the code supplied by kakenbok in #51 (comment). Added a test case that passes as well.

…olver and \Slim\Interfaced\AdvancedCallableResolverInterface

Fixes #51 and uses code supplied by kakenbok in #51 (comment)
@Rarst
Copy link
Contributor

Rarst commented Apr 21, 2021

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?

@Rarst
Copy link
Contributor

Rarst commented Apr 21, 2021

Possibly might be better improved upstream too, opened an issue there slimphp/Slim#3071

@mnapoli
Copy link
Member

mnapoli commented Nov 1, 2021

Thank you, we've merged #71 instead.

@mnapoli mnapoli closed this Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom implementation of CallableResolver breaks deferred middleware
3 participants