Repository navigation
Run the cross-SDK conformance corpus in CI - #33
Merged
Merged
Conversation
filias
marked this pull request as ready for review
October 16, 2026 09:47
filias
requested review from
nick434434,
ranael-garem and
tomasstark
and
a balanced review from Copilot
October 16, 2026 09:50
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The secret-dependent job needs a guard to prevent failures on fork and Dependabot pull requests.
1 open finding
What changed in this PR
Adds cross-SDK conformance checks to PHP SDK CI to detect drift from the golden corpus.
Changes:
- Checks out conformance suite
v0.4.0using a GitHub App token. - Runs the PHP-only corpus with PHP 8.1 and Node.js 22.
| File | Description |
|---|---|
.github/workflows/ci.yml |
Adds authenticated suite checkout, dependency setup, and conformance execution. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
tomasstark
approved these changes
Oct 16, 2026
nick434434
added a commit
that referenced
this pull request
Nov 4, 2026
## Why WordPress adds backslashes to `$_SERVER` (`wp_magic_quotes()`). `handleRequest()` reads headers from there through `fromGlobals()`. As a result, `Signature-Input`, `Signature-Agent` and `User-Agent` arrive as `\"https://crawler.exa.ai\"`, and no signature from a WordPress merchant verifies. Five merchants that send events over HTTP are affected, about 16k signed requests a week, all `unverifiable/unsupported_agent`. Removing the backslashes makes 40 of 40 sampled rows valid. The SDK stays framework-agnostic. The WordPress-specific unslashing goes in the plugin (getsupertab/connect-wp, PR to follow). This PR only lets callers pass their own `$_SERVER`-shaped array. ## Changes - New `RequestContext::fromServer(array $server, array $requestHeaders = [])` with the old `fromGlobals()` body. - `fromGlobals()` now calls `fromServer($_SERVER, getallheaders())`. No behavior change. - Test in `tests/Http/RequestContextTest.php`. ## Release notes (v2.2.0, all changes since v2.1.0) ### Added - `RequestContext::fromServer(array $server, array $requestHeaders = [])` builds a context from a `$_SERVER`-shaped array. Hosts that modify `$_SERVER` can pass a cleaned copy. WordPress, for example, adds backslashes to it, which broke signature verification for plugin merchants. `fromGlobals()` now delegates to it and behaves the same. (this PR) ### Internal (no runtime changes) - Added `conformance/run.php`, the PHP runner for the cross-SDK parity suite (#31). - CI runs the cross-SDK conformance corpus (#33), now pinned to v0.5.0 (#34). - On a no-match, the conformance runner now reports the SDK's Agreement-lane result instead of "no token needed" (#34). - Fixed a flaky status test by padding EC coordinates in the test JWK (#32). `CHANGELOG.md` has these entries under `[2.2.0] - 2026-11-04`, and `composer.json` is set to `v2.2.0`. After merging, tag `v2.2.0`. --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Adds a
conformancejob that runs the cross-SDK parity suite (pinned tov0.4.0,STC_ONLY=php, PHP 8.1), matching the TS and Python jobs. PHP behavior drifting from the golden corpus now turns CI red.The private conformance repo is checked out with a per-run token from an org-owned GitHub App (read-only on
connect-sdk-conformance), so it isn't tied to a personal account. Deploy keys are disabled in the org.🤖 Generated with Claude Code