ZF-3240: Zend_Http_Client: Documentation blocks out of sync, some features not documented in manual

Issue Type: Bug Created: 2008-05-12T05:06:59.000+0000 Last Updated: 2008-09-02T10:39:27.000+0000 Status: Resolved Fix version(s): - 1.6.0 (02/Sep/08)

Reporter: Pawel Przeradowski (squeaky) Assignee: julien PAULI (doctorrock83) Tags: - Zend_Http_Client

Related issues: Attachments: - Client.php.diff


Today I took closer look at Zend_Http_Client. Here is what I found out:

*__constructor* docblock lists non-existant parameter *$headers* whilst it doesnt list *$config* parameter

<pre class="highlight">
     * Contructor method. Will create a new HTTP client. Accepts the target
     * URL and optionally and array of headers.
     * @param Zend_Uri_Http|string $uri
     * @param array $headers Optional request headers to set
    public function __construct($uri = null, $config = null)

some methods are tagged with @throws and some are not. Mainly: * setConfig * setMethod * setHeaders * setCookieJar * setCookie * setFileUpload * setAuth * setAdapter * request * prepare_body * encodeAuthHeader

some methods are missing @return: * _setParameter * setAdapter

getHeader has

<pre class="highlight">.
I believe this should be 


not documented in manual $config key storeresponse. Default value is true. It allows for retrieval of Zend_Http_Reponse after calling request by getLastResponse. If set to false getLastReponse will return null instead.

The manual states "When set to false, some validation functions will be skipped." about strict $config key. The problem is what some means. It should mention that when true it performs validation against header names to see if they contain forbidden characters.

non BC changes to consider: setAdapter doesnt have return statement, it could return $this to aid fluent interface like other set methods do


Posted by Pawel Przeradowski (squeaky) on 2008-05-12T05:32:14.000+0000

added request, prepare_body, encodeAuthHeader and getHeader.

Posted by Pawel Przeradowski (squeaky) on 2008-05-12T05:48:21.000+0000

Fix for docbloks

Posted by Pawel Przeradowski (squeaky) on 2008-05-12T06:22:55.000+0000

Manual diff

Posted by julien PAULI (doctorrock83) on 2008-05-12T08:48:56.000+0000

Thanks for all those patches, we are working on them actually ;-) There are some more improvements to make the code fit the coding standards

Posted by julien PAULI (doctorrock83) on 2008-05-20T08:30:26.000+0000

Fixed at r9490

Posted by Wil Sinclair (wil) on 2008-09-02T10:39:27.000+0000

Updating for the 1.6.0 release.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.