php-sdk/tests/Unit/Server
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Christopher Hertel 60711951d4
[Schema][Server] Add the extensions framework SEP-2133 defines (#443)
* [Schema][Server] Add the extensions framework SEP-2133 defines

enableExtension() took any string and advertised it, with no way for an
extension to add a method: MessageFactory could not decode one, so nothing
downstream ever saw it.

Identifiers are now checked against the _meta key naming rules through
ExtensionIdentifier - a prefix is mandatory, since an unprefixed name has no
owner, and the modelcontextprotocol/mcp second labels the specification
reserves are recognised. An extension implementing
MethodProvidingExtensionInterface contributes both its message classes and
the handlers serving them.

MessageFactory::make() takes an $additional list of message classes, and
RequestHandlerInterface's result template is covariant so a handler
declaring a concrete result satisfies a collection typed by the interface.

* Fix stale @see reference in MethodProvidingExtensionInterface docblock

* [Schema][Server][Client] Make ExtensionIdentifier a value object

ExtensionInterface::getId() now returns ExtensionIdentifier, which
validates the SEP-2133 naming rules at construction instead of the
callers checking it. getMessages()/getRequestHandlers() move into
ExtensionInterface itself; AbstractExtension gives them empty
defaults for extensions that only announce a capability.
2026-08-18 20:47:27 +02:00
..
Extension [Schema][Server] Add the extensions framework SEP-2133 defines (#443) 2026-08-18 20:47:27 +02:00
Handler/Request [Capability] Harden structuredContent extraction (#417) 2026-08-15 04:03:20 +02:00
Session [Server] Throw the SDK's own RuntimeException from FileSessionStore (#404) 2026-08-14 21:29:26 +02:00
Transport [Tests] Pin that protected resource metadata advertises no scope of its own (#440) 2026-08-18 20:20:55 +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