kairosProject / Tests

A test helper library
MIT License
1 stars 2 forks source link

PHP 8.1 serialization error #8

Open matthieu88160 opened 1 year ago

matthieu88160 commented 1 year ago

When using a separate process to run tests, the ReflectionClass used to create new instances seems to be serialized by PHPUnit, issuing an exception:

PHPUnit\Framework\Exception: Fatal error: Uncaught Exception: Serialization of 'ReflectionClass' is not allowed in Standard input code:80
Stack trace:
#0 Standard input code(80): serialize(Array)
#1 Standard input code(111): __phpunit_run_isolated_test()
#2 {main}
  thrown in Standard input code on line 80
ERRORS!
Tests: 1, Assertions: 0, Errors: 1.
matthieu88160 commented 1 year ago

More information is required to reproduce this bug.