Closed
Description
Q | A |
---|---|
PHPUnit version | 9.5.26 |
PHP version | 8.1 |
Installation Method | Composer |
Summary
The last release of composer 2.5, includes a closure in the vendor/composer/ClassLoader.php
when running composer install.
When running test using the option processIsolation="true"
in phpunit.xml.dist this leads to the following error:
Serialization of 'Closure' is not allowed
.
Some other notes:
- This is not the case when running composer 2.4.* same test run fine.
- Composer 2.5 and
processIsolation="false"
also works. The problem seems to be the combination of the Closure generated by composer 2.5 and the use of processIsolation.
How to reproduce
- Use composer 2.5.
- Configure phpunit.dist.xml to use `processIsolation="true"``
- Run the tests.
Expected behavior
Test should run, or at least warn to not use process isolation when running composer 2.5