8000 [Console][FrameworkBundle] Broken exception handler on console · Issue #25718 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content < 8000 span style="width: 0%;" data-view-component="true" class="Progress-item progress-pjax-loader-bar left-0 top-0 color-bg-accent-emphasis">
[Console][FrameworkBundle] Broken exception handler on console #25718
Closed
@mjanser

Description

@mjanser
Q A
Bug report? yes
Feature request? no
BC Break report? yes
RFC? no
Symfony version 3.4.3

#25255 introduced an own exception handler in Console/Application.php before the kernel is booted. During kernel boot and if the framework-bundle is installed, it registers the exception handler of the debug component (Debug/ErrorHandler.php). When the command has ended the exception handler is restored in Console/Application.php, but this actually removes the handler of Debug/ErrorHandler.php and leaves the handler of Console/Application.php registered.

This behaviour seems unintended and wrong to me.

Additionally Debug/ErrorHandler.php registers a shutdown function to handle fatal errors. This depends on the exception handler being itself, but that's not the case in the above described situation. With the while loop introduced in #25408 it falls back the default null exception handler and then does nothing.
If New Relic is added to the setup that while loop will never end because the New Relic extension always returns its own exception handler by default (instead of null for PHP default handler).

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

      0