slimphp/Slim · error · RuntimeException

Could not detect any ServerRequest creator implementations.

Error message

Could not detect any ServerRequest creator implementations. Please install a supported implementation in order to use `App::run()` without having to pass in a `ServerRequest` object. See https://github.com/slimphp/Slim/blob/4.x/README.md for a list of supported implementations.

What it means

Error "Could not detect any ServerRequest creator implementations. Please install a supported implementation in order to use `App::run()` without having to pass in a `ServerRequest` object. See https://github.com/slimphp/Slim/blob/4.x/README.md for a list of supported implementations." thrown in slimphp/Slim.

Source

Thrown at Slim/Factory/ServerRequestCreatorFactory.php:53

     * @throws RuntimeException
     */
    public static function determineServerRequestCreator(): ServerRequestCreatorInterface
    {
        if (static::$serverRequestCreator) {
            return static::attemptServerRequestCreatorDecoration(static::$serverRequestCreator);
        }

        $psr17FactoryProvider = static::$psr17FactoryProvider ?? new Psr17FactoryProvider();

        /** @var Psr17Factory $psr17Factory */
        foreach ($psr17FactoryProvider->getFactories() as $psr17Factory) {
            if ($psr17Factory::isServerRequestCreatorAvailable()) {
                $serverRequestCreator = $psr17Factory::getServerRequestCreator();
                return static::attemptServerRequestCreatorDecoration($serverRequestCreator);
            }
        }

        throw new RuntimeException(
            "Could not detect any ServerRequest creator implementations. " .
            "Please install a supported implementation in order to use `App::run()` " .
            "without having to pass in a `ServerRequest` object. " .
            "See https://github.com/slimphp/Slim/blob/4.x/README.md for a list of supported implementations."
        );
    }

    protected static function attemptServerRequestCreatorDecoration(
        ServerRequestCreatorInterface $serverRequestCreator
    ): ServerRequestCreatorInterface {
        if (
            static::$slimHttpDecoratorsAutomaticDetectionEnabled
            && SlimHttpServerRequestCreator::isServerRequestDecoratorAvailable()
        ) {
            return new SlimHttpServerRequestCreator($serverRequestCreator);
        }

        return $serverRequestCreator;

View on GitHub (pinned to 80900fb39c)

When it happens

Trigger: Thrown at Slim/Factory/ServerRequestCreatorFactory.php:53 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/c406cba26ef1d9e7. Report an issue: GitHub.