slimphp/Slim · error · RuntimeException
Callable %s does not exist
Error message
Callable %s does not exist
What it means
Error "Callable %s does not exist" thrown in slimphp/Slim.
Source
Thrown at Slim/CallableResolver.php:144
* @return array{object, string|null} [Instance, Method Name]
*/
private function resolveSlimNotation(string $toResolve): array
{
/** @psalm-suppress ArgumentTypeCoercion */
preg_match(CallableResolver::$callablePattern, $toResolve, $matches);
[$class, $method] = $matches ? [$matches[1], $matches[2]] : [$toResolve, null];
if ($this->container && $this->container->has($class)) {
$instance = $this->container->get($class);
if (!is_object($instance)) {
throw new RuntimeException(sprintf('%s container entry is not an object', $class));
}
} else {
if (!class_exists($class)) {
if ($method) {
$class .= '::' . $method . '()';
}
throw new RuntimeException(sprintf('Callable %s does not exist', $class));
}
$instance = new $class($this->container);
}
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 {View on GitHub (pinned to 80900fb39c)
When it happens
Trigger: Thrown at Slim/CallableResolver.php:144 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/d7b1a5ef8e68ba4c.
Report an issue: GitHub.