php-sdk/tests/Conformance
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Christopher Hertel 3d596ca75b
[Server][Tests] Serve the modern (SEP-2575) lifecycle (#444)
* [Server][Tests] Serve the modern (SEP-2575) lifecycle

The revision removed the initialize handshake: every request carries its own
_meta - protocol version, client capabilities, client info - and answers
server/discover for what initialize used to return. There is no session to
keep, so there is nothing for the handshake-era dispatcher to do.

Builder::buildStateless() produces StatelessProtocol, and
StatelessHttpTransport serves it over one POST-only endpoint - GET and
DELETE are 405, and no Mcp-Session-Id exists to hand out.

Results go through a per-era wire codec rather than the handlers, so
resultType and the caching hints are stamped for 2026-07-28 and left off the
revisions that do not define them.

Covered by the modern conformance suite (make conformance-draft-server)
against its own baseline; unit coverage arrives with the fixes stacked on
this.

* Apply suggestions from code review

Co-authored-by: Christopher Hertel <mail@christopher-hertel.de>

* Fix critical stateless-lifecycle bugs from review

- Don't leak internal exception messages to clients on uncaught
  \Throwable; use a generic message like the handshake-era protocol
  and every built-in handler already do.
- Default a missing/invalid request id to null instead of "", and
  stop answering notifications and malformed messages as if they
  were "method not found" 404s.
- Read the POST body in a loop instead of a single read() call,
  which PSR-7 allows to return short.
2026-08-18 22:08:54 +02:00
..
Fixtures [Server][Tests] Serve the modern (SEP-2575) lifecycle (#444) 2026-08-18 22:08:54 +02:00
client.php Add PSR-3 compliant exception context when logging exceptions (#300) 2026-05-12 23:20:42 +02:00
conformance-baseline-2026-07-28.yml [Server][Tests] Serve the modern (SEP-2575) lifecycle (#444) 2026-08-18 22:08:54 +02:00
conformance-baseline.yml [Server] Compose StreamableHttpTransport security middleware via defaultMiddleware() factory (#307) 2026-05-25 13:49:43 +02:00
Elements.php Extend elicitation enum schema compliance (#261) 2026-03-22 18:46:40 +01:00
FileLogger.php fix: use Docker PHP-FPM to support sampling in conformance tests (#219) 2026-01-02 15:59:56 +01:00
score.php Fix conformance score calculcation (#313) 2026-05-19 14:40:17 +02:00
server-stateless.php [Server][Tests] Serve the modern (SEP-2575) lifecycle (#444) 2026-08-18 22:08:54 +02:00
server.php [Schema][Server] Add top-level title to Tool (#288) 2026-04-26 15:37:40 +02:00