ZF-8017: Zend_Service_Twitter_Search should not extend Zend_Http_Client



Currently Zend_Service_Twitter_Search extends Zend_Http_Client, this is bad because :

a) Zend_Service_Twitter_Search is NOT a Zend_Http_Client - it merely uses one (hence an architecture issue)

b) It does not make it possible for a mock Zend_Http_Client to be introduced to perform tests

c) It does not make it possible to use a subclass of Zend_Http_Client - which may have e.g. local site specific proxy / caching settings.

thanks David.


Do you have any comment's on what it should extend use to get the data from Twitter?

Jon -

Why do you think it needs to extend anything to get data from Twitter?

Can't it just USE a http client? In much the same way as e.g. Zend_Service_Twitter, Zend_Service_Flickr and so on use e.g. the rest client.


I agree with you. I'll have it extend the Zend_Rest_Client so it has have more control over it.


Let me know if this patch works for you.

The patch would solve my issue with injection of a different http client; thanks.

The patch was checked in to the trunk with r18573 and into the release branch with r18574.

Changing fix version to next minor release (1.10), as it was solved by changing the dependency from Zend_Http_Client to Zend_Rest_Client. (Adding or changing dependencies is not allowed in mini releases.)

r18574 has been reverted at this time.