slimphp/Slim · error · RuntimeException
%s could not instantiate a server request creator.
Error message
%s could not instantiate a server request creator.
What it means
Error "%s could not instantiate a server request creator." thrown in slimphp/Slim.
Source
Thrown at Slim/Factory/Psr17/Psr17Factory.php:68
public static function getStreamFactory(): StreamFactoryInterface
{
if (
!static::isStreamFactoryAvailable()
|| !(($streamFactory = new static::$streamFactoryClass()) instanceof StreamFactoryInterface)
) {
throw new RuntimeException(get_called_class() . ' could not instantiate a stream factory.');
}
return $streamFactory;
}
/**
* {@inheritdoc}
*/
public static function getServerRequestCreator(): ServerRequestCreatorInterface
{
if (!static::isServerRequestCreatorAvailable()) {
throw new RuntimeException(get_called_class() . ' could not instantiate a server request creator.');
}
return new ServerRequestCreator(static::$serverRequestCreatorClass, static::$serverRequestCreatorMethod);
}
/**
* {@inheritdoc}
*/
public static function isResponseFactoryAvailable(): bool
{
return static::$responseFactoryClass && class_exists(static::$responseFactoryClass);
}
/**
* {@inheritdoc}
*/
public static function isStreamFactoryAvailable(): bool
{View on GitHub (pinned to 80900fb39c)
When it happens
Trigger: Thrown at Slim/Factory/Psr17/Psr17Factory.php:68 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of slimphp/Slim@80900fb39c (2026-08-21).
Data as JSON: /api/errors/212b78b59e67f2e0.
Report an issue: GitHub.