php-sdk/tests/Unit
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
..
Capability [Capability] Apply a parameter's complete schema definition (#435) 2026-08-18 15:09:58 +02:00
Client [Schema] Omit the id of an error response that never had one (#442) 2026-08-18 15:24:19 +02:00
Fixtures [Server] Handle malformed JSON-RPC input graceful (#412) 2026-08-14 22:34:01 +02:00
JsonRpc [Schema] Omit the id of an error response that never had one (#442) 2026-08-18 15:24:19 +02:00
Schema [Schema] Serialize a settingless extension as an object (#438) 2026-08-18 14:59:12 +02:00
Server [Schema] Omit the id of an error response that never had one (#442) 2026-08-18 15:24:19 +02:00
ClientTest.php [Client] Implement setMaxRetries connection retries (#413) 2026-08-15 02:43:50 +02:00
ServerTest.php Update codestyle based on updated Symfony rules (#229) 2026-02-01 11:54:31 +01:00