php-sdk/tests/Unit
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Christopher Hertel 8bae3c054e
[Capability] Preserve optional content fields in PromptResultFormatter (#406)
* Preserve optional content fields in PromptResultFormatter

The formatter's typed-content path rebuilt each Content object from only
its required fields, silently dropping everything else a prompt returned
(annotations on every type, _meta and explicit mimeType on embedded
resource contents). Delegate to the schema classes' fromArray() instead,
keeping the historical mimeType defaulting and RuntimeException-with-
index error contract.

ImageContent was the only content class without annotations support, so
it gains the same constructor/fromArray()/jsonSerialize() handling as
TextContent and AudioContent.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Reword CHANGELOG entry to be user-facing

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 22:47:26 +02:00
..
Capability [Capability] Preserve optional content fields in PromptResultFormatter (#406) 2026-08-14 22:47:26 +02:00
Client [Client] Parse CRLF- and CR-delimited SSE events (#401) 2026-08-14 22:34:23 +02:00
Fixtures [Server] Handle malformed JSON-RPC input graceful (#412) 2026-08-14 22:34:01 +02:00
JsonRpc [Server] Handle malformed JSON-RPC input graceful (#412) 2026-08-14 22:34:01 +02:00
Schema [Capability] Preserve optional content fields in PromptResultFormatter (#406) 2026-08-14 22:47:26 +02:00
Server [Server] Handle malformed JSON-RPC input graceful (#412) 2026-08-14 22:34:01 +02:00
ServerTest.php Update codestyle based on updated Symfony rules (#229) 2026-02-01 11:54:31 +01:00