-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
Comments
I confirm. |
I will not invest time in debugging an issue that only affects PHPDBG. To be honest, I am thinking about removing support for it from php-code-coverage as well as PHPUnit itself. |
sebastianbergmann
added
the
feature/process-isolation
Issues related to running tests in separate PHP processes
label
Feb 11, 2020
Just for the sake of an example, when using regular PHP it will also report the stream as non-readable: php -r 'echo stream_get_meta_data(STDOUT)["mode"], "\n";' | cat
// Outputs: wb This problem first appeared in PHP 7.4.0. This might be a PHP bug, but I don't know better. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: