[Process] Regression: Error output-handling is affecting Drupal core development #57317
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
tl;dr: Since #52409,
\Symfony\Component\Process\Process
no longer captures error output when attempting to run a non-existent command on Linux--behavior Drupal core was relying on. The regression was first released in v7.1.0-BETA1 and persists into7.2
.Details
#52409 changed how the commandline is passed to
proc_open()
, apparently triggering a bug in PHP (php/php-src#12589) whereby invoking a non-existent command on Linux no longer provides any error output. That's important behavior for a major error condition. Hence my surprise when I discovered that it was a known issue before the PR was merged--that it was explicitly called out and that tests were simply updated to avoid it.As a consequence of the change, tests started failing on Drupal core component Composer Stager. This has caused a ripple effect and taken me away from other Drupal core work. I would really like to see it fixed quickly.
Steps to Reproduce
This PR demonstrates the problem. It does not yet fix it. (Since the regression was part of a performance enhancement, not a functional change, perhaps it wouldn't be out of the question to just revert it, if necessary.) This begins by temporarily reverting the regression and adding a test that we can see passing on CI[1]. Then it puts the regression back in place so we can see it failing.
This...
🟢 Used to print this on Linux:
🔴 Now it prints this:
To-do
src/**/CHANGELOG.md
files[1] Well, not very obviously, I guess, since a bunch of tests were already failing.