Skip to content

Commit 65b8a96

Browse files
committed
Merge branch '5.4' into 6.4
* 5.4: Adjust PR template [HttpClient] Disable HTTP/2 PUSH by default when using curl Bump Symfony version to 5.4.43 Update VERSION for 5.4.42 Update CONTRIBUTORS for 5.4.42 Update CHANGELOG for 5.4.42
2 parents b5e498f + 550cc67 commit 65b8a96

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

CurlHttpClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ final class CurlHttpClient implements HttpClientInterface, LoggerAwareInterface,
6666
*
6767
* @see HttpClientInterface::OPTIONS_DEFAULTS for available options
6868
*/
69-
public function __construct(array $defaultOptions = [], int $maxHostConnections = 6, int $maxPendingPushes = 50)
69+
public function __construct(array $defaultOptions = [], int $maxHostConnections = 6, int $maxPendingPushes = 0)
7070
{
7171
if (!\extension_loaded('curl')) {
7272
throw new \LogicException('You cannot use the "Symfony\Component\HttpClient\CurlHttpClient" as the "curl" extension is not installed.');

Tests/CurlHttpClientTest.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,15 @@ class CurlHttpClientTest extends HttpClientTestCase
2222
{
2323
protected function getHttpClient(string $testCase): HttpClientInterface
2424
{
25-
if (str_contains($testCase, 'Push')) {
26-
if (!\defined('CURLMOPT_PUSHFUNCTION') || 0x073D00 > ($v = curl_version())['version_number'] || !(\CURL_VERSION_HTTP2 & $v['features'])) {
27-
$this->markTestSkipped('curl <7.61 is used or it is not compiled with support for HTTP/2 PUSH');
28-
}
25+
if (!str_contains($testCase, 'Push')) {
26+
return new CurlHttpClient(['verify_peer' => false, 'verify_host' => false]);
2927
}
3028

31-
return new CurlHttpClient(['verify_peer' => false, 'verify_host' => false]);
29+
if (!\defined('CURLMOPT_PUSHFUNCTION') || 0x073D00 > ($v = curl_version())['version_number'] || !(\CURL_VERSION_HTTP2 & $v['features'])) {
30+
$this->markTestSkipped('curl <7.61 is used or it is not compiled with support for HTTP/2 PUSH');
31+
}
32+
33+
return new CurlHttpClient(['verify_peer' => false, 'verify_host' => false], 6, 50);
3234
}
3335

3436
public function testBindToPort()

0 commit comments

Comments
 (0)