@@ -91,7 +91,7 @@ class Request
91
91
/**
92
92
* Request body parameters ($_POST).
93
93
*
94
- * @var InputBag|ParameterBag
94
+ * @var InputBag
95
95
*/
96
96
public $ request ;
97
97
@@ -275,7 +275,7 @@ public function __construct(array $query = [], array $request = [], array $attri
275
275
*/
276
276
public function initialize (array $ query = [], array $ request = [], array $ attributes = [], array $ cookies = [], array $ files = [], array $ server = [], $ content = null )
277
277
{
278
- $ this ->request = new ParameterBag ($ request );
278
+ $ this ->request = new InputBag ($ request );
279
279
$ this ->query = new InputBag ($ query );
280
280
$ this ->attributes = new ParameterBag ($ attributes );
281
281
$ this ->cookies = new InputBag ($ cookies );
@@ -305,9 +305,7 @@ public static function createFromGlobals()
305
305
{
306
306
$ request = self ::createRequestFromFactory ($ _GET , $ _POST , [], $ _COOKIE , $ _FILES , $ _SERVER );
307
307
308
- if ($ _POST ) {
309
- $ request ->request = new InputBag ($ _POST );
310
- } elseif (0 === strpos ($ request ->headers ->get ('CONTENT_TYPE ' ), 'application/x-www-form-urlencoded ' )
308
+ if (0 === strpos ($ request ->headers ->get ('CONTENT_TYPE ' ), 'application/x-www-form-urlencoded ' )
311
309
&& \in_array (strtoupper ($ request ->server ->get ('REQUEST_METHOD ' , 'GET ' )), ['PUT ' , 'DELETE ' , 'PATCH ' ])
312
310
) {
313
311
parse_str ($ request ->getContent (), $ data );
@@ -457,7 +455,7 @@ public function duplicate(array $query = null, array $request = null, array $att
457
455
$ dup ->query = new InputBag ($ query );
458
456
}
459
457
if (null !== $ request ) {
460
- $ dup ->request = new ParameterBag ($ request );
458
+ $ dup ->request = new InputBag ($ request );
461
459
}
462
460
if (null !== $ attributes ) {
463
461
$ dup ->attributes = new ParameterBag ($ attributes );
0 commit comments