Skip to content

Add PHP conformance runner - #26

Draft
ranael-garem wants to merge 1 commit into
mainfrom
conformance/php-runner
Draft

Add PHP conformance runner#26
ranael-garem wants to merge 1 commit into
mainfrom
conformance/php-runner

Conversation

@ranael-garem

Copy link
Copy Markdown

Adds the PHP conformance runner (conformance/run.php) — the third SDK to join the cross-SDK behavioral-parity suite alongside TypeScript and Python.

The runner reads one scenario JSON on stdin, drives the real SDK entrypoints, and prints a normalized decision on stdout, byte-identical in shape to the TS/Python runners. All four surfaces are covered:

  • verify — drives LicenseTokenVerifier->verify() directly (the public SupertabConnect::verify() returns only a human string; the suite needs the LicenseTokenInvalidReason enum value).
  • enforceSupertabConnect::handleRequest() via a RequestContext built from the scenario headers; emits action / status / the four RSL headers.
  • customer-matchLicenseXmlParser::parseContentElementsContentMatcher::findBestMatch.
  • customer-obtainSupertabConnect::obtainLicenseToken (success → mint, throw → error).

Notes:

  • The file lives outside src/ and tests/, so phpcs/phpunit don't scan it — it can't affect this repo's own CI gate. It's exercised by the conformance orchestrator (a separate repo).
  • Runs against a fixed mock origin at localhost:9999; base URLs are injected, no SDK network behavior changes.

Paired with the conformance-repo PR that registers the php runner and records its divergences. A dedicated CI job that runs the corpus on every PR to this repo is a follow-up (mirrors the Python SDK's setup).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant