Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Framework bundle] Cleanup error and exception handlers on Kernel shutdown #53812

Closed
@simPod

Description

@simPod

Symfony version(s) affected

7.0.0

Description

PHPUnit 11 checks for any leftovers in error handlers sebastianbergmann/phpunit#5619

How to reproduce

Run FrameworkBundle->boot() in phpunit test.

$handler = ErrorHandler::register(null, false);

It results in Test code or tested code did not remove its own exception handlers thrown by phpunit.

Possible Solution

Introduce FrameworkBundle::shutdown() that would cleanup error handler set in boot(). IMO it's reasonable to have some cleanup in shutdown() of things initiated in boot().

Additional Context

No response

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