php-sdk/tests/Unit/Server
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Christopher Hertel 7e38c94954
[Server] Enforce x-mcp-header where a request uses it (SEP-2243) (#453)
* [Server] Enforce x-mcp-header where a request uses it

Only top-level properties were inspected, so an annotation on a nested
property was silently unenforced - the header could say anything. The walk
now follows a chain of properties keys to any depth and reads the argument
at that exact path.

Integer values compare numerically, so a client writing 42.0 for a body
value of 42 is no longer rejected.

* [Server] Stop comparing numeric-looking strings as numbers

is_numeric() and loose == both treat a string like "042" as equal to
"42", so a string argument could pass header validation against a
header that doesn't match it exactly. Gate the numeric comparison on
the argument's actual type and a decimal-only header instead.
2026-08-19 00:42:40 +02:00
..
Extension [Schema][Server] Add the extensions framework SEP-2133 defines (#443) 2026-08-18 20:47:27 +02:00
Handler/Request [Server] Close the conformance gaps in the modern lifecycle (#447) 2026-08-18 23:09:34 +02:00
Session [Server] Throw the SDK's own RuntimeException from FileSessionStore (#404) 2026-08-14 21:29:26 +02:00
Stateless [Server] Enforce x-mcp-header where a request uses it (SEP-2243) (#453) 2026-08-19 00:42:40 +02:00
Subscription [Server] Make subscriptions/listen actually deliver (#451) 2026-08-19 00:08:02 +02:00
Transport [Server] Close the conformance gaps in the modern lifecycle (#447) 2026-08-18 23:09:34 +02:00
Wire [Server] Let a server say how long its answers stay fresh (#450) 2026-08-18 23:53:16 +02:00
BuilderTest.php [Schema][Server] Add the extensions framework SEP-2133 defines (#443) 2026-08-18 20:47:27 +02:00
ClientGatewayTest.php [Schema][Client][Server] Close MCP Apps gaps: extension negotiation checks (#429) 2026-08-18 01:46:53 +02:00
ProtocolTest.php [Schema][Server] Preserve request id in JSON-RPC error responses instead of fabricating id:"" (#379) 2026-08-18 15:47:27 +02:00
RequestContextTest.php [Capability] Harden structuredContent extraction (#417) 2026-08-15 04:03:20 +02:00
SessionSubscriptionManagerTest.php Add missing handler for resource subscribe and unsubscribe (#220) 2026-02-18 00:11:35 +01:00