#111178Dispatch Extbase actions through a configurable PSR-15 middleware stack
Description
Extbase offers no way to wrap the dispatching of a controller action. BeforeActionCallEvent and AfterRequestDispatchedEvent allow code before and after, but not around it: no try/finally around the action, no timing across exceptions (e.g. tracing/APM such as Sentry spans), no short-circuit with an own response. Today this requires an own controller base class or XCLASS.
Proposal: Mvc\Dispatcher runs each action (once per pass of the forward loop) through a PSR-15 middleware stack named “extbase”. Middlewares are registered in Configuration/RequestMiddlewares.php like the “frontend”/“backend” stacks (before/after/disabled, ordered and cached by MiddlewareStackResolver) and executed by Core\Http\MiddlewareDispatcher. The kernel resolves the controller and calls processRequest(). Core registers no middleware in this stack, so behaviour without third-party middlewares is unchanged. No change to ActionController or ControllerInterface.
The inner stack around the action invocation (#[Authorize], #[RateLimit]) follows in a separate change, see the related issue.
Reviews 2
Related issues 1
History 16
-
Alexander Schnitzler changed Related to #111179 <span data-processor="relativetime" data-value="2026-10-20T15:20:31+00:00" > 10/20/26, 15:20 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 96940 status
NewUnder Review <span data-processor="relativetime" data-value="2026-10-20T15:59:57+00:00" > 10/20/26, 15:59 </span> -
Gerrit Code Review pushed patch set 2 for main to change 96940 <span data-processor="relativetime" data-value="2026-10-23T09:28:31+00:00" > 10/23/26, 09:28 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 96940 <span data-processor="relativetime" data-value="2026-10-23T10:45:42+00:00" > 10/23/26, 10:45 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 96940 <span data-processor="relativetime" data-value="2026-11-04T08:55:54+00:00" > 11/04/26, 08:55 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 96940 <span data-processor="relativetime" data-value="2026-11-04T10:01:35+00:00" > 11/04/26, 10:01 </span>