dump() no longer produces output in PHPUnit tests running under PHP 8.3

Created on 19 March 2024, 2 months ago
Updated 9 April 2024, about 2 months ago

Problem/Motivation

Using dump() no longer produces output in PHPUnit tests running under PHP 8.3. This applies to tests run in isolation, annotated with @runInSeparateProcess.

Practically, all core Kernel and Functional(Javascript) tests, and all Unit test annotated with @runInSeparateProcess are subject to this.

The reason is explained by this change in PHP: https://github.com/php/php-src/pull/11169, that led to this change in PHPUnit: https://github.com/sebastianbergmann/phpunit/issues/5356.

See more info https://drupal.slack.com/archives/C1BMUQ9U6/p1710853208536789

Proposed resolution

Make TestVarDumper write to STDERR instead of STDOUT: in fact this is used only for debugging and we should not really care. STDERR output is not swallowed by PHPUnit.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Fixed

Version

10.2

Component
PHPUnit 

Last updated about 10 hours ago

Created by

🇮🇹Italy mondrake 🇮🇹

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024