Repository navigation
fix(response): handle generic PSR-7 bodies in JsonResponse - #17
Conversation
📝 Summary
Merge Risk: ⚪ Minimal · up to
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Changelog✅ Contribution check passed. Head: Base: Contribution: 1 new valid fragment(s). Policy: ordinary.
|
|
@coderabbitai review The previous attempt was rate-limited and its stated reset window has elapsed. Please review the current JsonResponse body-interoperability changes on 956798e. |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
🔇 Additional comments: 3
src/JsonResponse.php: 1
31-31: LGTM!Also applies to: 58-85, 101-104
tests/JsonResponseTest.php: 1
134-206: LGTM!.changelog/json-response-body.md-6-6: 1
6-6: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
⚠️ Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.Add a top-level Markdown heading.
markdownlint-cli2reports MD041 because the changelog has no H1 after its front matter. Add a heading before the description.Proposed fix
--- category: fixed type: patch --- +# Generic body support in `JsonResponse` + Keep JsonResponse payload access and replacement usable after a generic PSR-7 body replacement, with explicit decoding and stream errors.Source: Linters/SAST tools
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Organization UI
- Review profile: ASSERTIVE
- Plan: Advanced
- Run ID:
01d04461-4bc4-4563-8bab-d4549480baf9
📒 Files selected for processing: 3
.changelog/json-response-body.mdsrc/JsonResponse.phptests/JsonResponseTest.php
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
Summary
Closes #13
Validation
Three regressions reproduced undefined-method errors before the change. 11 JsonResponse tests / 32 assertions pass on PHP 8.4.26 with PHPUnit 12.5.38 and an isolated bootstrap using existing Nyholm/PSR source. Covers valid JSON, null, invalid JSON, detached/non-seekable bodies, cursor preservation, immutability and existing encoding options/headers. PHP lint, diff whitespace checks and composer validate --strict passed.
Full DevTools suite is not claimed: development dependencies are incomplete and the previously blocked download was not retried. The broader source-based suite reaches a known missing Symfony Process dependency in ConsumerSkillTest. PHP 8.3 was not executed locally.
For maintainer review; no merge or release.
GitHub-hosted CI follow-up
The test workflow completed successfully on PHP 8.3, 8.4 and 8.5. The PHP 8.3 job log confirms 189 tests / 298 assertions (8 existing PHPUnit notices), with the PHPUnit execution step successful (not merely a published status). Changelog, Reports and Wiki PR workflows also completed successfully. Local dependency limitations above do not describe the hosted runner. Published sources were read back and match the locally tested files byte-for-byte.