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); assert($testSuite instanceof TestSuite); return Storage::tempDir($testSuite->rootPath); } }