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

Created on 19 March 2024, 9 months ago
Updated 27 August 2024, 3 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 32 minutes 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.71.5 2024