This commit is contained in:
nuno maduro
2026-05-02 17:07:08 +01:00
parent 5f37939fda
commit 1c7c9754fd

View File

@ -17,18 +17,12 @@ final readonly class Bootstrapper implements BootstrapperContract
public function __construct(private Container $container) {} public function __construct(private Container $container) {}
public function boot(): void public function boot(): void
{
$this->container->add(State::class, new FileState($this->tempDir()));
}
/**
* across worktrees of the same repo. See {@see Storage} for the key
*/
private function tempDir(): string
{ {
$testSuite = $this->container->get(TestSuite::class); $testSuite = $this->container->get(TestSuite::class);
assert($testSuite instanceof TestSuite); assert($testSuite instanceof TestSuite);
return Storage::tempDir($testSuite->rootPath); $tempDir = Storage::tempDir($testSuite->rootPath);
$this->container->add(State::class, new FileState($tempDir));
} }
} }