-
Notifications
You must be signed in to change notification settings - Fork 96
HTTPClient injection through constructor is wrongfully reused #29
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
Comments
Hello SpacePossum, |
@SpacePossum this would indeed be a breaking change, and would require at least a major version upgrade. At this stage we're not yet considering a major version upgrade. An alternative could be to create two child classes that inherit from For our reference, do you currently have a specific requirement that would allow for two separate |
Hi, Thanks for the feedback and thoughts. Currently I have no real need for the two separate clients. I came to this issue when working on #28. |
@samwierema please ping me when a new major release is being considered, I'm happy to see if I can help out at that time. Thanks for reply 👍 |
When construction the client you can only pass one HTTPClient; @ see
https://github.com/messagebird/php-rest-api/blob/master/src/MessageBird/Client.php#L95
The client is used for both
chat
andmessaging
while the services have diff. end-points.I would like to suggest to add an additional parameter to the constructor allowing two HTTPClient's to be passed, i.e. something like this;
Since the class is not declared final the change would be a BC break, so I would like to suggest doing the change on a new 2.x line and release the change on a 2.0 tag.
The text was updated successfully, but these errors were encountered: