$message =
sprintf('has type "%s" but this class %s.',
$type,
$parentMsg ?: 'was not found'
);
} else { $alternatives =
$this->
createTypeAlternatives($this->container,
$reference);
if (null !==
$target =
(array_filter($reference->
getAttributes(),
static fn ($a) =>
$a instanceof Target
)[0
] ?? null
)) { $target = null !==
$target->name ? "('{
$target->name
}')" : '';
$message =
sprintf('has "#[Target%s]" but no such target exists.%s',
$target,
$alternatives);
} else { $message =
$this->container->
has($type) ? 'this service is abstract' : 'no such service exists';
$message =
sprintf('references %s "%s" but %s.%s',
$r->
isInterface() ? 'interface' : 'class',
$type,
$message,
$alternatives);
} if ($r->
isInterface() && !
$alternatives) { $message .= ' Did you create a class that implements this interface?';
} } $message =
sprintf('Cannot autowire service "%s": %s %s',
$currentId,
$label,
$message);
if (null !==
$this->lastFailure
) { $message =
$this->lastFailure."\n".
$message;