php-sdk/tests/Unit/Schema
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
..
Content [Capability] Preserve optional content fields in PromptResultFormatter (#406) 2026-08-14 22:47:26 +02:00
Elicitation CS update after release of v3.95 (#282) 2026-04-26 12:39:27 +02:00
Enum CS update after release of v3.95 (#282) 2026-04-26 12:39:27 +02:00
Extension [Schema][Server] Add MCP Apps extension (io.modelcontextprotocol/ui) support (#281) 2026-06-01 09:35:54 +01:00
JsonRpc style: apply php-cs-fixer and PHPStan fixes (#289) 2026-04-20 20:49:15 +02:00
Request CS update after release of v3.95 (#282) 2026-04-26 12:39:27 +02:00
Result [Server] Handle malformed JSON-RPC input graceful (#412) 2026-08-14 22:34:01 +02:00
IconTest.php style: apply php-cs-fixer and PHPStan fixes (#289) 2026-04-20 20:49:15 +02:00
ImplementationTest.php [Schema] Fix Implementation::fromArray rejecting falsy-but-valid name/version (#393) 2026-07-14 23:41:51 +02:00
ResourceDefinitionTest.php [Server] Allow runtime-resolved element handlers (#294) 2026-05-29 07:16:12 +02:00
ResourceTemplateTest.php Add title field to Resource and ResourceTemplate (#301) 2026-05-17 14:10:31 +02:00
ServerCapabilitiesTest.php Split testsuite for unit and inspector based tests (#82) 2025-09-25 22:27:41 +01:00
ToolTest.php [Schema] Always emit {} for empty tool schema properties (#407) 2026-08-14 21:50:08 +02:00