Skip to content

feat: support repeated headers per RFC 9110 §5.3 - #4

Draft
YOU54F wants to merge 3 commits into
masterfrom
fix/repeated-headers-rfc9110
Draft

YOU54F wants to merge 3 commits into
masterfrom
fix/repeated-headers-rfc9110

Conversation

@YOU54F

@YOU54F YOU54F commented Oct 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • Header values are registered per index, so each value of a repeated header keeps its own matcher.
  • Mock server logs are surfaced in VerifyResult on failure.
  • New example/repeated-headers example, wired into run-examples, plus unit tests.

Test results (pact_ffi from pact-foundation#584)

  • Unit: 1008 tests OK.
  • All examples pass except server-sent-events, which needs a plugin that isn't installed locally (unrelated).

Release notes

ClientInterface gains methods, which breaks custom implementations.

Depends on

These tests pass against a pact_ffi built from pact-foundation#584 and fail against the released pact_ffi, so this is a draft until pact-foundation#584 is released and the FFI version here is bumped.

Known upstream issue

Per-index header matchers work in the mock server but collapse to a single, randomly chosen rule when the pact file is written (pact_models to_v3_json drops the index). This predates pact-foundation#584; an issue is being drafted for pact-reference.

🤖 Generated with Claude Code

Header values are registered per index so each value of a repeated header
keeps its own matcher, mock server logs are surfaced on verify failure, and
a repeated-headers example is added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coveralls

coveralls commented Oct 28, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 42679628635

Coverage decreased (-0.06%) to 92.415%

Details

  • Coverage decreased (-0.06%) from the base build.
  • Patch coverage: 3 uncovered changes across 1 file (18 of 21 lines covered, 85.71%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
src/PhpPact/FFI/Client.php 8 5 62.5%
Total (5 files) 21 18 85.71%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 2874
Covered Lines: 2656
Line Coverage: 92.41%
Coverage Strength: 113.91 hits per line

💛 - Coveralls

YOU54F and others added 2 commits November 9, 2026 17:24
…evert before merge)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… longer matches)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants