chargebee / chargebee-php

PHP library for the Chargebee API.
https://apidocs.chargebee.com/docs/api?lang=php
MIT License
72 stars 62 forks source link

Would you accept a contribution with redesigned client? #50

Closed Wojciechem closed 1 week ago

Wojciechem commented 1 year ago

Hello Chargebee,

We've been having problems testing the client API provided with the Chargebee SDK, and for the past few meetings we've been thinking about modernizing the code to make it more testable.

It would greatly improve our experience of integrating with Chargebee. Currently we implement the required abstraction in our code, but the possibilities are limited this way. We feel that improving the open source client is more future-proof and beneficial than re-writing the API integration on our side.

Main points we would like to address with such redesign are:

Would you be interested in such a contribution?

Wojciechem commented 1 year ago

As an example of a nice library design we would like to achieve: https://github.com/mailgun/mailgun-php

Arminek commented 1 year ago

Hello Chargebee maintainers,

@cb-yateshmathuria @cb-khushbubibay Do you have any thoughts about this?

cb-khushbubibay commented 1 year ago

Hi @Wojciechem @Arminek Thank you for raising this concern. We sincerely appreciate your input. If it's possible, could you please create a forked repository and raise a pull request with the suggested changes? This way, we can check its feasibility and review the modifications.

yched commented 1 year ago

Very interested in this as well, we need to inject a custom HTTP client. For now we will go with a simple fork that allows us to inject a custom Guzzle handler stack of middewares, but ideally the Chargebee library would accept a PSR-18 client as suggested in the OP.

Wojciechem commented 1 year ago

Apologies, I did not have the capacity to look at it yet, but I will try to work on the fork next week :)

Wojciechem commented 1 year ago

Not a proper redesign, but I made some refactoring to address the points from my issue. It should also help other use-cases like customizing request headers / specific http client configuration. CC @cb-khushbubibay

Wojciechem commented 6 months ago

bump :wink:

Wojciechem commented 1 week ago

Closing, since the change was merged (even though it was reverted because of older php compatibility issues)