Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10.x] fix: Restore the original error/exception handler on terminating app #49791

Closed
wants to merge 1 commit into from

Conversation

siketyan
Copy link

Resolves #49237, #49593

HandleExceptions bootstrapper sets an error handler for the application, but does not restore the original handler after the run. This causes failure on isolated tests in PHPUnit on PHP 8.3. In addition, PHPUnit is going to detect the error handler which is not restored and mark as risky test since PHPUnit v11 (See sebastianbergmann/phpunit#5619).

Related pull request: sebastianbergmann/phpunit#5677

@siketyan siketyan changed the title fix: Restore the original error/exception handler on terminating app [10.x] fix: Restore the original error/exception handler on terminating app Jan 23, 2024
@nunomaduro
Copy link
Member

nunomaduro commented Jan 23, 2024

Hi @siketyan, this issue is fixed on Laravel 11 (#49622) - just tested locally. However, feel that this is too big of a change to even port the fix that was made on Laravel 11. Lets see what @taylorotwell thinks.

@siketyan
Copy link
Author

siketyan commented Jan 23, 2024

Note that this issue is causing unexpected test failure for #[RunInSeparateProcess] in combination of PHPUnit 10 and PHPUnit 8.3. Fix is still needed in Laravel 10 I think.

@driesvints
Copy link
Member

@siketyan right now we don't support this on Laravel v10, sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PHPUnit's process isolation doesn't work due to Laravel's application bootstrapping
4 participants