-
Notifications
You must be signed in to change notification settings - Fork 196
routes => middleware => multiple actions does not get lazy loaded #361
Comments
It depends on what code you have in those actions. Usually you return a Response object in an action middleware. Which basically means you will not execute the second action but go back through all the previous middleware. What you can have in that middleware is something like this: 'middleware' => [
Middleware\SessionMiddleware::class,
Middleware\AuthMiddleware::class,
Action\PostAction::class
], |
Both actions return $next(...) if there is $next. test.global.php
App\ErrorHandler.php
App\TextAction.php
App\TestAction2.php
Without any error you will get an
If you now force an fatal error in
Got: empty If you now force an fatal error in Expected:
Got:
For some reason the |
@sergu44o What version are you using? This issue is almost 2 years old. |
This repository has been closed and moved to mezzio/mezzio; a new issue has been opened at mezzio/mezzio#18. |
Example:
config
Im using a middleware (priority PHP_INT_MAX) to catch fatal error (
register_shutdown_function
).When im using one action only in the config
and when i force an fatal error in that action
the registered shutdown function gets called.
If im using two actions as shown above
then no registered shutdown function gets called.
The middleware im using wont be invoked/loaded before the action.
The text was updated successfully, but these errors were encountered: