Process isolation under phpdbg throws exceptions #3965
Labels
feature/process-isolation
Issues related to running tests in separate PHP processes
type/bug
Something is broken
Summary
Use of process isolation throws exceptions under
phpdbg
. At first I thought this was a regression of #3772, but it seems to be a separate cause.I think was able to track the bug down to this line in
TestCaseMethod.tpl
(there's also similar code inTestCaseClass.tpl
). Both these lines attempt to read fromSTDOUT
, without first checking if it is a readable stream.If I put in a debug statement using
stream_get_meta_data(STDOUT)
, you can see thatSTDOUT
is not readable:See also:
Current behavior
Any test that uses process isolation under
phpdbg
does not run, and instead throws an exception similar to:PHPUnit\Framework\Exception: Notice: stream_get_contents(): read of 8192 bytes failed with errno=9 Bad file descriptor in Standard input code on line 336
.How to reproduce
Run this test under
phpdbg
:And see this output:
Expected behavior
Process isolation should work for
phpdbg
in the same way as it does for other PHP SAPIs.Output of
composer info | sort
The text was updated successfully, but these errors were encountered: