php-sdk/tests/Unit/Client
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Christopher Hertel 5041caf77a
[Schema] Omit the id of an error response that never had one (#442)
* [Schema] Omit the id of an error response that never had one

An error response whose id could not be read sent `"id": ""`, which claims
the peer issued a request with an empty-string id - a different statement
from "the id could not be read". JSON-RPC spells the latter as a null id,
and a receiver that cannot read the id is exactly the case the code covers.

[BC Break] Error::$id accepts null and getId() may return it. All the for*()
factories default to null, fromArray() accepts a missing or explicitly-null
id, and the member is omitted from the serialized form when absent.

* Guard null response id in Client/Server Protocol handlers

Also fix Error::jsonSerialize()'s phpdoc: data belongs inside error, not beside it.
2026-08-18 15:24:19 +02:00
..
Handler/Request [Schema][Server] Harden sampling tools against the spec (#420) 2026-08-15 04:13:53 +02:00
Transport [Client] Parse CRLF- and CR-delimited SSE events (#401) 2026-08-14 22:34:23 +02:00
BuilderTest.php [Schema][Client][Server] Close MCP Apps gaps: extension negotiation checks (#429) 2026-08-18 01:46:53 +02:00
ClientTest.php [Client][Server] Add Roots support (#395) 2026-08-14 23:04:25 +02:00
ConfigurationTest.php [Client] Reject non-positive timeouts in Configuration (#415) 2026-08-14 08:22:20 +02:00
ProtocolTest.php [Schema] Omit the id of an error response that never had one (#442) 2026-08-18 15:24:19 +02:00