Skip to content

v0.2.0

Latest

Choose a tag to compare

@galatanovidiu galatanovidiu released this 11 Sep 10:18
· 1 commit to trunk since this release
f6119d9

Breaking release. The generated DTO API is replaced by a dependency-free runtime for the exact MCP schema revisions 2025-11-25 and 2026-07-28. Read the migration guide before upgrading.

Breaking changes

  • Construction starts with Schemas::create()->forVersion($revision) and uses Schema::fromArray(), fromValue(), or fromJson() to return immutable records. Validation is always on and exact for the selected revision; unknown revision identifiers throw UnsupportedRevisionException.
  • Public protocol objects live under Record, object unions under Contract, and enum-like string constants under Value. The former Client, Common, and Server namespaces, DTO constructors and factories, class-based enums, validation flags, and toArray() variants are removed with no compatibility aliases.
  • Overlapping object unions hydrate the valid record that declares the most input keys, with canonical order as the tie-breaker. Scalar unions keep canonical first-match behavior.
  • SchemaException and every runtime exception extend \InvalidArgumentException.

Changed

  • Fractional ElicitResult.content values are accepted in both revisions; 2026-07-28 JSONValue accepts fractional numbers and null; 2025-11-25 NumberSchema.default, minimum, and maximum accept fractional numbers.
  • Safe inline allOf refinements of the canonical Error definition hydrate Record\Error rather than an anonymous stdClass.

Fixed

  • Raw JSON numeric scanning is linear for dense numeric documents and rejects non-finite or native-overflowing numeric tokens.
  • Programmatic input rejects NUL-prefixed object keys, aligns its nesting limit with raw JSON, and rejects out-of-native-range integral floats only where an integer schema requires them.
  • Numeric-literal getters preserve validated integral floats such as -32700.0.
  • Large validated inputs use less peak memory; an 8 MiB payload completes within a 128 MiB PHP memory limit.
  • A type list containing array and null accepts null.

Removed

  • Generated skill/ type reference and lookup scripts.
  • Per-class @since protocol-history annotations.

Full Changelog: v0.1.3...v0.2.0