diff --git a/src/ClientCapabilities.php b/src/ClientCapabilities.php index f20417a..766f817 100644 --- a/src/ClientCapabilities.php +++ b/src/ClientCapabilities.php @@ -28,7 +28,7 @@ public function toArray(): array $data = []; if ($this->roots || $this->rootsListChanged) { $data['roots'] = new \stdClass(); - if ($this->rootsListChanged) { + if ($this->rootsListChanged !== null) { $data['roots']->listChanged = $this->rootsListChanged; } } @@ -62,6 +62,7 @@ public static function fromArray(array $data): static } return new static( + $rootsEnabled, $rootsListChanged, $sampling, $data['experimental'] ?? null