Use temporary file (instead of STDOUT) to communicate result from child process to parent process #5290
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.
I recently worked with an application that used an unusual combination of output buffering, custom error handling, custom exception handling, and custom shutdown handling.
The way this application works got in the way of writing edge-to-edge characterization tests for the application: trying to run such a test in a separate PHP process (using PHPUnit's process isolation functionality) did not work.
The application's custom error handler acted on
E_DEPRECATED
events emitted by the PHP interpreter for code generated by PHPUnit. This was taken care of in #5270.The application's use of output buffering interfered with the way that PHPUnit currently communicated results from a child process to the parent process.
These changes made PHPUnit's process isolation functionality work in the context of that application. They also do not break any existing test. However, they feel like a short-term solution for an edge case problem.
Considering other problems such as #5230, I would much rather completely rethink how process isolation should work.