Implement LogStream fallback mechanism and add unit tests.#2
Implement LogStream fallback mechanism and add unit tests.#2gustavofreze merged 2 commits intomainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: efa9fb12f7
ℹ️ 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 PR implements a fallback mechanism for the LogStream class when no resource is provided, and adds unit tests to verify the behavior. However, the implementation changes the fallback from STDERR (a standard error stream) to php://memory (an in-memory buffer), which fundamentally breaks the logger's documented behavior.
Changes:
- Modified LogStream::from() to use php://memory as fallback instead of STDERR constant
- Added unit tests for LogStream covering custom resource and null fallback scenarios
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/Internal/Stream/LogStream.php | Changes fallback behavior from STDERR to php://memory when no resource provided |
| tests/Internal/Stream/LogStreamTest.php | Adds new test file with two test cases for LogStream functionality |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.