ZF-8017: Zend_Service_Twitter_Search should not extend Zend_Http_Client
Description
Hi,
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.
Comments
Posted by Jon Whitcraft (sidhighwind) on 2009-10-05T12:31:05.000+0000
Do you have any comment's on what it should extend use to get the data from Twitter?
Posted by David Goodwin (davidgoodwin) on 2009-10-06T01:05:25.000+0000
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.
Posted by Jon Whitcraft (sidhighwind) on 2009-10-14T16:15:56.000+0000
David,
I agree with you. I'll have it extend the Zend_Rest_Client so it has have more control over it.
Jon
Posted by Jon Whitcraft (sidhighwind) on 2009-10-15T02:55:56.000+0000
Let me know if this patch works for you.
Posted by David Goodwin (davidgoodwin) on 2009-10-15T04:11:14.000+0000
The patch would solve my issue with injection of a different http client; thanks.
Posted by Jon Whitcraft (sidhighwind) on 2009-10-16T06:48:28.000+0000
The patch was checked in to the trunk with r18573 and into the release branch with r18574.
Posted by Matthew Weier O'Phinney (matthew) on 2009-10-16T08:52:46.000+0000
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.