diff --git a/src/DI/McpExtension.php b/src/DI/McpExtension.php index 7cb052d..ff7f127 100644 --- a/src/DI/McpExtension.php +++ b/src/DI/McpExtension.php @@ -43,7 +43,7 @@ public function getConfigSchema(): Schema $parameters = $this->getContainerBuilder()->parameters; $expectService = Expect::anyOf( - Expect::string()->required()->assert(static fn ($input) => str_starts_with($input, '@') || class_exists($input) || interface_exists($input)), + Expect::string()->required()->assert(static fn ($input): bool => is_string($input) && (str_starts_with($input, '@') || class_exists($input) || interface_exists($input))), Expect::type(Statement::class)->required(), );