smsapi / smsapi-php-client

SMSAPI PHP client that allows you to send messages, manage Short URLs and administrate your SMSAPI account.
https://www.smsapi.pl
Other
64 stars 39 forks source link

Library does not depend on specific http client implementation (PSR-18) #79

Closed mateuszsip closed 5 years ago

mateuszsip commented 6 years ago

Hi. As discussed in #78 PR introduces PSR-18 to this library.

Had to rewrite a lot of stuff to do this, and I am not sure if you'll like it :) Would love to head what do you think, then we can discuss it and work something out :)

I changed how executors work, introduced request/response builders, managed to get rid of internal request/response implementations.

Unit tests pass, but I couldn't test integration with real service.

TODO:

maciejlew commented 5 years ago

It seems like you disable proxy feature, see SmsapiClient::setProxy.

mateuszsip commented 5 years ago

Yes - this is implementation-specific so it would make sense to tell users how to setup proxy with implementation of choice.

Now I'm thinking abbout logging - this should be also something that users handle on their side by decorating client (exactly the same way this is currently implemented, by outside of this lib) - of course we can provide decorator and tell them how to use it. WDYT?

I will rebase this PR in the following days.

maciejlew commented 5 years ago

Split this PR into smaller chunks. Separate PSR-18 changes from other changes (i.e. HTTP statuses and methods). That will make that PRs more suitable for next reviews. 80+ files to check is really a challenge.