Skip to content

Commit 696a3f8

Browse files
Remove parameter from jsonRequest
1 parent e5e77eb commit 696a3f8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Symfony/Component/BrowserKit/AbstractBrowser.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,15 +164,15 @@ public function xmlHttpRequest(string $method, string $uri, array $parameters =
164164
/**
165165
* Converts the request parameters into a json string and use it as request content.
166166
*/
167-
public function jsonRequest(string $method, string $uri, array $parameters = [], array $files = [], array $server = [], bool $changeHistory = true): Crawler
167+
public function jsonRequest(string $method, string $uri, array $parameters = [], array $server = [], bool $changeHistory = true): Crawler
168168
{
169169
$content = json_encode($parameters);
170170

171171
$this->setServerParameter('CONTENT_TYPE', 'application/json');
172172
$this->setServerParameter('HTTP_ACCEPT', 'application/json');
173173

174174
try {
175-
return $this->request($method, $uri, [], $files, $server, $content, $changeHistory);
175+
return $this->request($method, $uri, [], [], $server, $content, $changeHistory);
176176
} finally {
177177
unset($this->server['CONTENT_TYPE']);
178178
unset($this->server['HTTP_ACCEPT']);
@@ -455,7 +455,7 @@ protected function doRequestInProcess($request)
455455
foreach ($deprecations ? unserialize($deprecations) : [] as $deprecation) {
456456
if ($deprecation[0]) {
457457
// unsilenced on purpose
458-
@trigger_error($deprecation[1], \E_USER_DEPRECATED);
458+
trigger_error($deprecation[1], \E_USER_DEPRECATED);
459459
} else {
460460
@trigger_error($deprecation[1], \E_USER_DEPRECATED);
461461
}

src/Symfony/Component/BrowserKit/Tests/AbstractBrowserTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function testXmlHttpRequest()
6363
public function testJsonRequest()
6464
{
6565
$client = $this->getBrowser();
66-
$client->jsonRequest('GET', 'http://example.com/', ['param' => 1], [], [], true);
66+
$client->jsonRequest('GET', 'http://example.com/', ['param' => 1], [], true);
6767
$this->assertEquals($client->getRequest()->getServer()['CONTENT_TYPE'], 'application/json');
6868
$this->assertEquals($client->getRequest()->getServer()['HTTP_ACCEPT'], 'application/json');
6969
$this->assertFalse($client->getServerParameter('CONTENT_TYPE', false));

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy