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

Scope of Proxy Interface #31

Closed rollenes closed 9 years ago

rollenes commented 9 years ago

I found that Proxy/Uri is used in each action. To create an action you have to pass Proxy Object to Action`s constructor. When Action::execute() is called proxy is calling Action::uri() to create Proxy/Uri Object. Than proxy uses Uri object to create request to the webservice. So in fact Action knows how its gona be executed. Action Object should not know nothing about Proxy nor Proxy/Uri nor about anything that is outside Api/Action namespace. Action should be simple container that holds only request parameters.

I`ve prepared some implementaion that partly removes Action knowelege about Proxy namespace. https://github.com/rollenes/smsapi-php-client/tree/issue/proxy-scope Please make some code review there, and let me know if I am heading in right direction.

I cannot make pull request because my changes breaks interface. And release branch is required. See #30.

sudlik commented 9 years ago

Your solution looks good, but you need keep backward compatibility if you want release it in v1.3.0.

sudlik commented 9 years ago

Please make pull request to 2.0.0

rollenes commented 9 years ago

I`ll leave it without PR. I do not think that this is good approach to create version 2.0 over the top of version 1. See: #59