-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add support for injecting into an array #23
Conversation
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.
Sure, adding this method could help integrating pre PSR-7 applications. I added some comments to the pull request.
Thanks, I will address your comments today. |
@cawolf it should be ready for review now |
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.
Please see the unresolved conversation regarding the interface.
I'm not sure about this in the OpentracingBundle-core/Tests/Mock/MockTracer.php Lines 50 to 53 in 7e2bc45
At least, it is what What do you think ? Should i change the |
Sure, you can try to make it work that way. I remember running into issues testing that behaviour exactly because of passing arrays by reference and not be return, that's why that implementation is just pretending to inject headers. After all, it's just here to make the tests work. |
Preserving existing headers in the |
@cawolf any chance to get this merged soon ? |
thanks ! |
released in v0.4.2 |
Would you be ok to support injecting context into an array instead of
Psr\Http\Message\RequestInterface
?It would allow for easier integration into existing code.
Thanks.