-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Route Middleware stack #1622
Labels
Comments
Slim's middleware operates as LAST IN FIRST EXECUTED [LIFE]. |
Intuitively, I think that this is a bug too as your expected order matches what I expected too. |
I think it is too @akrabat. |
Please PR a fix! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Suppose we have this:
App Level Middlewares are always executed first, since they are on app level. Ok.
Group /foo Middlewares will execute before Group /bar Middlewares. Ok.
The question:
Why Get / Middlewares will execute before Group /foo Middlewares ?
Shouldn't be executed after the Group /bar Middlewares?
I was expecting this order:
But I got:
I fixed this changing the \Slim\Route->finalize() to:
If this is a bug(what I think it is), I can make PR.
Commits here: https://github.com/mathmarques/Slim/commits/fix-route-middleware
The text was updated successfully, but these errors were encountered: