[Client] add client conformance test suite (#279)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d5b00cd8ae
commit
abae36e888
1 changed files with 189 additions and 9 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue