slimphp/Slim · error · RuntimeException

%s is not resolvable

Error message

%s is not resolvable

What it means

Error "%s is not resolvable" thrown in slimphp/Slim.

Source

Thrown at Slim/CallableResolver.php:165

        }
        return [$instance, $method];
    }

    /**
     * @param mixed $resolved
     * @param mixed $toResolve
     *
     * @throws RuntimeException
     */
    private function assertCallable($resolved, $toResolve): callable
    {
        if (!is_callable($resolved)) {
            if (is_callable($toResolve) || is_object($toResolve) || is_array($toResolve)) {
                $formatedToResolve = ($toResolveJson = json_encode($toResolve)) !== false ? $toResolveJson : '';
            } else {
                $formatedToResolve = is_string($toResolve) ? $toResolve : '';
            }
            throw new RuntimeException(sprintf('%s is not resolvable', $formatedToResolve));
        }
        return $resolved;
    }

    private function bindToContainer(callable $callable): callable
    {
        if (is_array($callable) && $callable[0] instanceof Closure) {
            $callable = $callable[0];
        }
        if ($this->container && $callable instanceof Closure) {
            /** @var Closure $callable */
            $callable = $callable->bindTo($this->container);
        }
        return $callable;
    }

    /**
     * @param callable|string|array{class-string, string}|mixed $toResolve

View on GitHub (pinned to 80900fb39c)

When it happens

Trigger: Thrown at Slim/CallableResolver.php:165 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/6be18642746ade61. Report an issue: GitHub.