Record requests sent through the in-memory transport.#61
Merged
gustavofreze merged 2 commits intoJun 16, 2026
Conversation
There was a problem hiding this comment.
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
Requestpassed toInMemoryTransport::send(), even when the response queue is exhausted. - Expose recorded requests via
receivedRequests()andlastReceivedRequest(). - Add unit tests and README documentation demonstrating request recording, plus new
.claudePostToolUse 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. |
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.
Summary
What this pull request does.
Related issue
Closes #...
Checklist
composer reviewpasses.composer testspasses.