container->add(State::class, new FileState($this->tempDir())); } /** * TIA's per-project state directory. Default layout is * `~/.pest/tia//` so the graph survives `composer * install`, stays out of the project tree, and is naturally shared * across worktrees of the same repo. See {@see Storage} for the key * derivation and the home-dir-missing fallback. */ private function tempDir(): string { $testSuite = $this->container->get(TestSuite::class); assert($testSuite instanceof TestSuite); return Storage::tempDir($testSuite->rootPath); } }