Skip to content

Allow multiple runs #4993

Description

@Slamdunk
Q A
PHPUnit version 10.0.x-dev
PHP version 8.1.5
Installation Method Composer

Summary

Hi, I'm the maintainer of ParaTest, a tool to run PHPUnit tests in parallel.

One way ParaTest can run is to spawn $(nproc) processes and run multiple tests within a single process.
Multiple tests are called each with a separate \PHPUnit\TextUI\Application::run call withing the same process.
This is a design choice that allow both:

  1. Single bootstrap operation for all the tests within the same process
  2. Dynamic (so non-preemptive) split of tests across $(nproc) processes

To maximise the overall speed.

This design collides with the new Facade singleton in c853041, of which seal is never released after the run ends.

So I'd like to ask:

  1. either to reset the Singleton after the run
  2. or (better) remove the Singleton design and leverage a proper dependency injection

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions