This commit is contained in:
nuno maduro
2026-05-01 20:02:46 +01:00
parent 45b1d4ce20
commit bed5e5b54a
39 changed files with 4 additions and 426 deletions

View File

@ -3,8 +3,10 @@
declare(strict_types=1);
use Pest\Contracts\Restarter;
use Pest\Kernel;
use Pest\Panic;
use Pest\Support\Container;
use Pest\TestCaseFilters\GitDirtyTestCaseFilter;
use Pest\TestCaseMethodFilters\AssigneeTestCaseFilter;
use Pest\TestCaseMethodFilters\IssueTestCaseFilter;
@ -193,17 +195,11 @@ use Symfony\Component\Console\Output\ConsoleOutput;
try {
$kernel = Kernel::boot($testSuite, $input, $output);
// Restarters re-exec the PHP process when conditions warrant it
// (XdebugRestarter drops Xdebug on TIA replay; PcovRestarter pins
// `pcov.directory` to the project root). Runs here, after
// Kernel::boot has loaded `tests/Pest.php` (so
// `pest()->tia()->always()` is visible) and before any plugin's
// `handleArguments` runs (so a re-exec replays cleanly).
$container = \Pest\Support\Container::getInstance();
$container = Container::getInstance();
foreach (Kernel::RESTARTERS as $restarterClass) {
$restarter = $container->get($restarterClass);
assert($restarter instanceof \Pest\Contracts\Restarter);
assert($restarter instanceof Restarter);
$restarter->maybeRestart($rootPath, $originalArguments);
}