Since PHPUnit 10, process isolation must be specified on a single class level or as a global CLI/config switch.
This would cause issues because Drupal needs to run Unit tests NOT in isolation for performance reasons.
For that purpose, workarounds were introduced to programmatically set process isolation in the test constructor.
However, in PHPUnit 12 that is no longer possible as the test constructor can no longer be overridden, and trying to intervene in the setUp()
method is already too late for process isolation.
The #[RunTestsInSeparateProcesses]
attribute works but needs to be set on each concrete test class, it can not be specified on abstract base classes.
In this issue, introduce a check that throws a deprecation if the #[RunTestsInSeparateProcesses]
attribute is not specified on the concrete test class.
Then, in the parent, adding #[RunTestsInSeparateProcesses] attribute to all Kernel and Functional tests, through an automated Rector script.
Needs review
11.0 🔥
phpunit
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
No activities found.