-
Couldn't load subscription status.
- Fork 3
IBX-10859: Fixed ENCODER_CONTEXT being present in response for nested objects
#203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
20ffff7 to
8f3bdb2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes an issue where ENCODER_CONTEXT metadata was leaking into API responses when using the Visitor Adapter pattern. The fix recursively removes all ENCODER_CONTEXT entries from normalized data structures, including nested objects.
Key Changes:
- Added recursive
removeEncodeContext()method to stripENCODER_CONTEXTfrom all levels of data structures - Enhanced test coverage to verify removal of nested
ENCODER_CONTEXTentries
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/contracts/Output/Visitor.php | Implements recursive removal of ENCODER_CONTEXT from normalized data |
| tests/lib/Output/VisitorTest.php | Adds test coverage for nested ENCODER_CONTEXT removal with array and ArrayObject cases |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
ENCODER_CONTEXT being present in response for nested objectsENCODER_CONTEXT being present in response for nested objects
Description:
This PR removes
ENCODER_CONTEXTfrom responses, when using Visitor Adapter.For QA:
Documentation: