[Client] add client conformance test suite (#279)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Christopher Hertel 2026-04-26 12:33:21 +02:00 • committed by GitHub
commit abae36e888
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -78,9 +78,9 @@ class ClientCapabilities implements \JsonSerializable
* sampling?: object,
* elicitation?: object,
* experimental?: object,
* }
* }|\stdClass
*/
public function jsonSerialize(): array
public function jsonSerialize(): array|object
{
$data = [];
if ($this->roots || $this->rootsListChanged) {
@ -102,6 +102,6 @@ class ClientCapabilities implements \JsonSerializable
$data['experimental'] = (object) $this->experimental;
}
return $data;
return $data ?: new \stdClass();
}
}