Skip to content

Record requests sent through the in-memory transport.#61

Merged
gustavofreze merged 2 commits into
mainfrom
feature/in-memory-transport-request-recording
Jun 16, 2026
Merged

Record requests sent through the in-memory transport.#61
gustavofreze merged 2 commits into
mainfrom
feature/in-memory-transport-request-recording

Conversation

@gustavofreze

Copy link
Copy Markdown
Member

Please follow the contributing guidelines.

Summary

What this pull request does.

Related issue

Closes #...

Checklist

  • Tests added or updated.
  • Documentation updated when applicable.
  • composer review passes.
  • composer tests passes.

Copilot AI review requested due to automatic review settings June 16, 2026 16:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds request-recording capabilities to the InMemoryTransport so tests (and local development) can assert which outbound requests were built and sent, while retaining FIFO response behavior.

Changes:

  • Record every Request passed to InMemoryTransport::send(), even when the response queue is exhausted.
  • Expose recorded requests via receivedRequests() and lastReceivedRequest().
  • Add unit tests and README documentation demonstrating request recording, plus new .claude PostToolUse hooks.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/Unit/Client/Transports/InMemoryTransportTest.php Adds tests covering request recording and last-received behavior.
src/Internal/Client/RequestRecorder.php Introduces an internal recorder to store sent requests in order.
src/Client/Transports/InMemoryTransport.php Records inbound requests and exposes read APIs for them.
README.md Documents the new request-recording behavior with an example.
.claude/settings.json Adds PostToolUse hook configuration to run conformance scripts.
.claude/hooks/php-prose-punctuation-conformance.py New hook enforcing prose punctuation rules in Markdown and PHP comments.
.claude/hooks/php-ordering-conformance.py New hook enforcing deterministic ordering rules for PHP members/parameters.

Comment thread tests/Unit/Client/Transports/InMemoryTransportTest.php
Comment thread tests/Unit/Client/Transports/InMemoryTransportTest.php
Comment thread tests/Unit/Client/Transports/InMemoryTransportTest.php
Comment thread tests/Unit/Client/Transports/InMemoryTransportTest.php
Comment thread .claude/settings.json
@gustavofreze gustavofreze merged commit 05d26a5 into main Jun 16, 2026
8 checks passed
@gustavofreze gustavofreze deleted the feature/in-memory-transport-request-recording branch June 16, 2026 16:24
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