Hardens REST route adaptation and schema contracts.
- Prevents overlapping route patterns from dispatching a sibling permission callback or handler.
- Supports all WordPress-compatible PCRE named-capture syntaxes through the new Route_Pattern module.
- Preserves nested schema property maps, defaults, empty-object shape, and recursive output context filtering.
- Hardens callable, direct, and controller schema fallback paths against malformed or propertyless schemas.
- Rejects unsupported methods, malformed metadata, incoherent safety annotations, and output callbacks without a non-empty output schema.
- Preserves the public Rest_Route_Ability::build_args(): array contract for downstream consumers.
Compatibility notes:
- Every non-readonly operation must declare boolean destructive and idempotent annotations.
- Readonly operations cannot declare contradictory safety hints.
- Callable output_callback declarations require a non-empty output_schema.
- Supported methods are GET, POST, PUT, PATCH, and DELETE.
Validation:
- Adapter: 101 PHPUnit tests / 287 assertions, PHPCS, PHPStan, PHP 7.4-8.5 CI matrix.
- abilities-catalog downstream: PHPCS, PHPStan, and single-site/multisite suites on PHP 8.1 and 8.3.