Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[FrameworkBundle][BC Break] Adding http_exception_listener introduces BC break to exception handling #27212

Copy link
Copy link
Closed
@Majkl578

Description

@Majkl578
Issue body actions

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.