diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index a98fb9e..1c96f0e 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -28,8 +28,8 @@ public function getConfigTreeBuilder(): TreeBuilder ->arrayNode('server') ->addDefaultsIfNotSet() ->children() - ->stringNode('name')->defaultValue(self::DEFAULT_NAME)->end() - ->stringNode('version')->defaultValue(self::DEFAULT_VERSION)->end() + ->scalarNode('name')->defaultValue(self::DEFAULT_NAME)->end() + ->scalarNode('version')->defaultValue(self::DEFAULT_VERSION)->end() ->end() ->end() ->end(); diff --git a/src/MethodHandler/InitializeMethodHandler.php b/src/MethodHandler/InitializeMethodHandler.php index 8909c02..35096d6 100644 --- a/src/MethodHandler/InitializeMethodHandler.php +++ b/src/MethodHandler/InitializeMethodHandler.php @@ -19,7 +19,7 @@ #[AsMethodHandler(methodName: 'initialize')] class InitializeMethodHandler implements MethodHandlerInterface { - public const string PROTOCOL_VERSION = '2025-03-26'; + public const string PROTOCOL_VERSION = '2024-11-05'; public function __construct( private readonly string $serverName, diff --git a/src/Service/ResponseFactory.php b/src/Service/ResponseFactory.php index c872f5b..85434a7 100644 --- a/src/Service/ResponseFactory.php +++ b/src/Service/ResponseFactory.php @@ -46,6 +46,7 @@ private function createResponse(JsonRpcResponse $response): JsonResponse { $json = $this->serializer->serialize($response, 'json', [ AbstractObjectNormalizer::SKIP_NULL_VALUES => true, + AbstractObjectNormalizer::PRESERVE_EMPTY_OBJECTS => true, ]); return JsonResponse::fromJsonString($json, JsonResponse::HTTP_OK);