-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Q | A |
---|---|
PHPUnit version | 9.2.5 |
PHP version | 7.4.7 |
Installation Method | Composer |
Summary
One of our tests started failing with Serialization of 'Closure' is not allowed
. When I removed the @runInSeparateProcess
(which I have to keep as workaround for https://bugs.php.net/bug.php?id=79646) I got an entirely different error which helped me find the problem in the test.
Apparently there is some issue with process isolation - the data that are serialized to be sent back to the original process contain a Closure and the serialization fails as a result.
Note: This has nothing to do with #2739 - that's about sending data into the test, this is about getting data back.
I'm not sure what data are serialized and where the serialization happens so I'm unable to provide more details and a reproducer for now. Can you point me where in PHPUnit's source code this serialization happens? (Using -v and --debug didn't get me a stack trace.)