{"record":{"id":"5920169f5513413c","repo":"slimphp/Slim","slug":"route-collector-cache-file-s-is-not-readable","errorCode":null,"errorMessage":"Route collector cache file `%s` is not readable","messagePattern":"Route collector cache file `(.+?)` is not readable","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"Slim/Routing/RouteCollector.php","lineNumber":140,"sourceCode":"        $this->defaultInvocationStrategy = $strategy;\n        return $this;\n    }\n\n    /**\n     * {@inheritdoc}\n     */\n    public function getCacheFile(): ?string\n    {\n        return $this->cacheFile;\n    }\n\n    /**\n     * {@inheritdoc}\n     */\n    public function setCacheFile(string $cacheFile): RouteCollectorInterface\n    {\n        if (file_exists($cacheFile) && !is_readable($cacheFile)) {\n            throw new RuntimeException(\n                sprintf('Route collector cache file `%s` is not readable', $cacheFile)\n            );\n        }\n\n        if (!file_exists($cacheFile) && !is_writable(dirname($cacheFile))) {\n            throw new RuntimeException(\n                sprintf('Route collector cache file directory `%s` is not writable', dirname($cacheFile))\n            );\n        }\n\n        $this->cacheFile = $cacheFile;\n        return $this;\n    }\n\n    /**\n     * {@inheritdoc}\n     */\n    public function getBasePath(): string","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/slimphp/Slim/blob/80900fb39cafce3ae53b18a2c4f642a122f03095/Slim/Routing/RouteCollector.php#L122-L158","documentation":"Error \"Route collector cache file `%s` is not readable\" thrown in slimphp/Slim.","triggerScenarios":"Thrown at Slim/Routing/RouteCollector.php:140 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":"80900fb39cafce3ae53b18a2c4f642a122f03095","analyzedAt":"2026-08-21T01:41:09.580Z","schemaVersion":2},"datasetVersion":"2026-08-21T03:17:12.404Z"}