{"record":{"id":"bb19d3ec2c7727c7","repo":"pestphp/pest","slug":"a-dataset-named-s-does-not-exist-you-may-creat","errorCode":null,"errorMessage":"A dataset named [%s] does not exist. You may create one using `dataset('%s', ['a', 'b']);`.","messagePattern":"A dataset named \\[(.+?)\\] does not exist\\. You may create one using `dataset\\('(.+?)', \\['a', 'b'\\]\\);`\\.","errorType":"exception","errorClass":"DatasetDoesNotExist","httpStatus":null,"severity":"error","filePath":"src/Repositories/DatasetsRepository.php","lineNumber":191,"sourceCode":"    {\n        $matchingDatasets = array_filter(self::$datasets, function (string $key) use ($name, $currentTestFile): bool {\n            [$datasetScope, $datasetName] = explode(self::SEPARATOR, $key);\n\n            if ($name !== $datasetName) {\n                return false;\n            }\n\n            return str_starts_with($currentTestFile, $datasetScope);\n        }, ARRAY_FILTER_USE_KEY);\n\n        /** @var string|null $closestScopeDatasetKey */\n        $closestScopeDatasetKey = array_reduce(\n            array_keys($matchingDatasets),\n            fn (string|int|null $keyA, string|int|null $keyB): string|int|null => $keyA !== null && strlen((string) $keyA) > strlen((string) $keyB) ? $keyA : $keyB\n        );\n\n        if ($closestScopeDatasetKey === null) {\n            throw new DatasetDoesNotExist($name);\n        }\n\n        return $matchingDatasets[$closestScopeDatasetKey];\n    }\n\n    /**\n     * @param  array<array<mixed>>  $combinations\n     * @return array<array<array<mixed>>>\n     */\n    private static function getDatasetsCombinations(array $combinations): array\n    {\n        $result = [[]];\n        foreach ($combinations as $index => $values) {\n            $tmp = [];\n            foreach ($result as $resultItem) {\n                foreach ($values as $value) {\n                    $tmp[] = array_merge($resultItem, [$index => $value]);\n                }","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/pestphp/pest/blob/1af74a215c3a89bc7a44fc6f9322e369eaad2423/src/Repositories/DatasetsRepository.php#L173-L209","documentation":"Error \"A dataset named [%s] does not exist. You may create one using `dataset('%s', ['a', 'b']);`.\" thrown in pestphp/pest.","triggerScenarios":"Thrown at src/Repositories/DatasetsRepository.php:191 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1af74a215c3a89bc7a44fc6f9322e369eaad2423","analyzedAt":"2026-08-21T02:16:38.132Z","schemaVersion":2},"datasetVersion":"2026-08-21T03:17:12.404Z"}