Skip to content

test code did not remove its own error handler. #102

Description

@stopfstedt

Bug Report

Q A
PHP 8.5.9
laminas/laminas-diagnostics 1.30.1
sebastianbergmann/phpunit 13.3.0
symfony/framework-bundle 8.1.4

Summary

The diagnostics checks runner does not revert the error handler if a given check raises an ErrorException.

Current behavior

PHPUnit emits a Test code or tested code did not remove its own error handlers warning.

Please see ilios/ilios#7341 for a real-world example.

How to reproduce

You'll need to upgrade to at least PHPUnit v11 in order trigger this warning. This project is still on v9, so you can't.

Expected behavior

The runner cleans up after itself, and PHPUnit does not emit the warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions