Refactor namespaces and add request handling classes for improved HTTP processing.#48
Refactor namespaces and add request handling classes for improved HTTP processing.#48gustavofreze merged 2 commits intomainfrom
Conversation
…ed HTTP processing.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c5e52fc4b9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
This pull request refactors the codebase to improve HTTP request and response handling through namespace reorganization and the addition of new request decoding functionality.
Changes:
- Refactored test namespaces from
TinyBlocks\HttptoTest\TinyBlocks\Httpfor clearer separation between test and production code - Moved stream-related classes from
Internal\Response\StreamtoInternal\Streamfor better logical organization - Added new
Requestclass with fluent API for decoding PSR-7 ServerRequest objects, providing typed access to route parameters and JSON body fields with safe default values
Reviewed changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| composer.json | Updated autoload-dev namespace, changed PHP version requirement to 8.5, removed ext-mbstring dependency |
| phpstan.neon.dist | Added ignore rule for mixed to string conversions |
| README.md | Added comprehensive documentation for new Request API, reorganized documentation structure |
| src/Request.php | New public API class for wrapping and decoding PSR-7 requests |
| src/Internal/Request/*.php | New internal classes for request decoding: Decoder, DecodedRequest, Body, Uri, and Attribute |
| src/Internal/Stream/*.php | Moved from Internal/Response/Stream, added fromStream(), content(), and isEmptyContent() methods |
| src/Internal/Response/InternalResponse.php | Updated import path for StreamFactory |
| tests/**/*.php | Updated all test namespaces and imports to use Test\TinyBlocks\Http prefix |
| tests/RequestTest.php | New comprehensive test suite for request decoding functionality |
| tests/Internal/Stream/StreamFactoryTest.php | Moved and enhanced with rewind behavior tests |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ed HTTP processing.
No description provided.