Closed
Description
Symfony version(s) affected: 4.0.9/4.1.0-BETA1
Description
Commit 4e527aa added a service http_exception_listener
. This registers a system-wide exception handler that sets request's _controller
attribute to a closure during kernel.exception
.
Also this closure controller generates a response on the event. As a consequence of that, this triggers listeners on kernel.response
event - with _controller
as a closure instead of previously not being invoked at all, and the generated response instead of null.
How to reproduce
Failing test case provided separately in #27213.
Additional context
Encountered in API-only application, no templating etc., only custom request/response handling and custom exception handling.