PHPUnit\Runner\ErrorHandler::__construct is private since PHPUnit 11.1

Created on 8 May 2024, 8 months ago
Updated 22 May 2024, 7 months ago

Problem/Motivation

In core/tests/bootstrap.php we currently have the following code:

set_error_handler(new BootstrapErrorHandler(new PhpUnitErrorHandler()));

Where PhpUnitErrorHandler is an alias for PHPUnit\Runner\ErrorHandler.

Since PHPUnit 11.1.0 the constructor for PHPUnit\Runner\ErrorHandler is marked private, and we get the following error:

Error in bootstrap script: Error:
Call to private PHPUnit\Runner\ErrorHandler::__construct() from scope PHPUnit\TextUI\Application

Steps to reproduce

Proposed resolution

Call PHPUnit\Runner\ErrorHandler::instance() instead.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

๐Ÿ“Œ Task
Status

Fixed

Version

11.0 ๐Ÿ”ฅ

Component
PHPUnitย  โ†’

Last updated about 21 hours ago

Created by

๐Ÿ‡ฆ๐Ÿ‡บAustralia mstrelan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024