{"record":{"id":"3fd9d9228f7ed768","repo":"slimphp/Slim","slug":"s-could-not-instantiate-a-stream-factory","errorCode":null,"errorMessage":"%s could not instantiate a stream factory.","messagePattern":"(.+?) could not instantiate a stream factory\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"Slim/Factory/Psr17/Psr17Factory.php","lineNumber":56,"sourceCode":"            !static::isResponseFactoryAvailable()\n            || !(($responseFactory = new static::$responseFactoryClass()) instanceof ResponseFactoryInterface)\n        ) {\n            throw new RuntimeException(get_called_class() . ' could not instantiate a response factory.');\n        }\n\n        return $responseFactory;\n    }\n\n    /**\n     * {@inheritdoc}\n     */\n    public static function getStreamFactory(): StreamFactoryInterface\n    {\n        if (\n            !static::isStreamFactoryAvailable()\n            || !(($streamFactory = new static::$streamFactoryClass()) instanceof StreamFactoryInterface)\n        ) {\n            throw new RuntimeException(get_called_class() . ' could not instantiate a stream factory.');\n        }\n\n        return $streamFactory;\n    }\n\n    /**\n     * {@inheritdoc}\n     */\n    public static function getServerRequestCreator(): ServerRequestCreatorInterface\n    {\n        if (!static::isServerRequestCreatorAvailable()) {\n            throw new RuntimeException(get_called_class() . ' could not instantiate a server request creator.');\n        }\n\n        return new ServerRequestCreator(static::$serverRequestCreatorClass, static::$serverRequestCreatorMethod);\n    }\n\n    /**","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/slimphp/Slim/blob/80900fb39cafce3ae53b18a2c4f642a122f03095/Slim/Factory/Psr17/Psr17Factory.php#L38-L74","documentation":"Error \"%s could not instantiate a stream factory.\" thrown in slimphp/Slim.","triggerScenarios":"Thrown at Slim/Factory/Psr17/Psr17Factory.php:56 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"}