-
-
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
Passing Exception instance via DataProvider throws ReflectionException #4347
Comments
@stemis Quick check: you are running the tests in a seperate process, is that correct? @sebastianbergmann Is this a known limitation and expected behaviour? |
Yes this only happens with |
@stemis Thanks for the additional information. Passing data around using serialization should only be used for external processes including PHPT files. Ah! Thanks for the patch notes to your update :) Thanks for bringing this to my attention. I will reply here sometime next week when working on #4302 (main loop refactoring) and #3736 (data provider resource management). |
I can confirm this bug on PHPUnit 9.5.1. However, this only seems to happen with PHP 7.4. I can't reproduce this with PHP 7.3, so I think something changed in 7.4. |
Hello! Got this bug on phpunit 8.5.0, php 7.4
|
Hello! Got this bug on phpunit 9.5.10, php 7.4 Exit Code: 2(Misuse of shell builtins) Output:PHPUnit 9.5.10 by Sebastian Bergmann and contributors. ...ESerialization of 'ReflectionClass' is not allowed |
I have the same bug when migrate laravel project from php8.2 to php 8.3
parameter processIsolation to false to make tests run on 8.3 if I set to "true" all tests fails If you need more info please let me know and I will be happy to give more details My composer file in case it is important
I tried to use native lib ./phpunit.phar instead of composer and still have problem with isolation |
Summary
When passing an
Exception
instance via a dataProvider, an Uncaught ReflectionException is thrown:Current behavior
How to reproduce
processIsolation="true"
The text was updated successfully, but these errors were encountered: