Closed
Description
Symfony version(s) affected
7.1.6
Description
HttpClientDataCollector::escapePayload creates a new Process()
-> it fails if proc_open
is disabled:
The Process class relies on proc_open, which is not available on your PHP installation.
How to reproduce
$request =
$this->httpClient->request('POST', 'https://www.linkedin.com/oauth/v2/accessToken', [
"body" => [
"grant_type" => "authorization_code",
"code" => "11111111",
"redirect_uri" => 'https://example.com',
"client_id" => 'abc',
"client_secret" => 'ddd'
]
]);
$content = $request->getContent(false);
throw new \Exception();
Possible Solution
escapePayload could be modified to avoid new Process()
and generate the command in-place.
Additional Context
escapePayload is called only if the request has either a json content or a body.