php-sdk/tests/Unit/Schema
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Dayna Blackwell 797472777f
[Schema] fix: allow URIs without double slash in Resource and ResourceTemplate (RFC 3986) (#297)
* fix: allow URIs without double slash in Resource and ResourceTemplate (RFC 3986)

The URI regex required "://" after the scheme, rejecting valid URIs
like urn:isbn:123, mailto:user@example.com, config:key, and data:
URIs. RFC 3986 only requires ":" after the scheme; the "//" is part
of the authority component which is optional.

Changed both Resource.URI_PATTERN and ResourceTemplate.URI_TEMPLATE_PATTERN
to require ":" instead of "://".

Adds data-provider tests for URIs without double slash in both classes.

Fixes #293

* Reword unit tests

---------

Co-authored-by: Christopher Hertel <mail@christopher-hertel.de>
2026-05-08 10:14:08 +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
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 CS update after release of v3.95 (#282) 2026-04-26 12:39:27 +02:00
IconTest.php style: apply php-cs-fixer and PHPStan fixes (#289) 2026-04-20 20:49:15 +02:00
ResourceTemplateTest.php [Schema] fix: allow URIs without double slash in Resource and ResourceTemplate (RFC 3986) (#297) 2026-05-08 10:14:08 +02:00
ResourceTest.php [Schema] fix: allow URIs without double slash in Resource and ResourceTemplate (RFC 3986) (#297) 2026-05-08 10:14:08 +02:00
ServerCapabilitiesTest.php Split testsuite for unit and inspector based tests (#82) 2025-09-25 22:27:41 +01:00
ToolTest.php [Schema][Server] Add top-level title to Tool (#288) 2026-04-26 15:37:40 +02:00