Closed
Description
Symfony version(s) affected: 5.3, 5.4
Description
Some CURL constants could be not defined depending on libcurl version.
Thus private CurlHttpClient::validateExtraCurlOptions
throws Undefined constant "CURLOPT_PINNEDPUBLICKEY"
even though user code doesn't use this constant.
For example CURLOPT_PINNEDPUBLICKEY requires libcurl 7.39.0
How to reproduce
You could try Centos 7
with remi PHP
.
PHP 8.0.8
cURL support => enabled
cURL Information => 7.29.0
$client = new CurlHttpClient();
$response = $client->request('GET', 'https://download.geonames.org/export/dump/alternatenames/RU.zip', [
'extra' => [
'curl' => [
CURLOPT_MAX_RECV_SPEED_LARGE => 1024
]
]
]);
var_dump(strlen($response->getContent()));
Possible Solution
Check that constant is defined(...)
or add polyfill