ZF-11347: Zend_Controller_Request_Http store query in superglobal and can be setted

Description

setQuery() and setPost() method add param in $_GET and $_POST superglobals. So query and post are not properties of Requests, and so this method must be static Or Considering query and post are properties of Requests, and so they must be stored in, I think so. Else Request is design to be use one time and so must make a singleton pattern.

Example : $request = new Zend_Controller_Http_Request();

$requestBis = clone $request; $requestBis->setQuery('__mykey', 'myvalue');

echo $request->getQuery('__mykey', 'novalue');

Actual result : myvalue Expected result: novalue

Comments

It's not the prettiest situation, however changing the global behaviour would be a backwards incompatible change for those relying on it. As such, I'm marking the issue won't-fix.