From 3aaa742d40327e070c1ca9d20bf074ae46c6617a Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Sun, 28 Apr 2019 23:09:39 +0200 Subject: [PATCH] [HttpClient] fix skipping h2push test case --- .../Component/HttpClient/Tests/CurlHttpClientTest.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/HttpClient/Tests/CurlHttpClientTest.php b/src/Symfony/Component/HttpClient/Tests/CurlHttpClientTest.php index b5e82732bc7cd..0f75d1c359402 100644 --- a/src/Symfony/Component/HttpClient/Tests/CurlHttpClientTest.php +++ b/src/Symfony/Component/HttpClient/Tests/CurlHttpClientTest.php @@ -28,7 +28,6 @@ protected function getHttpClient(string $testCase): HttpClientInterface /** * @requires PHP 7.2.17 - * @requires extension curl 7.61 */ public function testHttp2Push() { @@ -36,8 +35,8 @@ public function testHttp2Push() $this->markTestSkipped('PHP 7.3.0 to 7.3.3 don\'t support HTTP/2 PUSH'); } - if (!\defined('CURLMOPT_PUSHFUNCTION') || !(CURL_VERSION_HTTP2 & curl_version()['features'])) { - $this->markTestSkipped('curl is not compiled with support for HTTP/2 PUSH'); + if (!\defined('CURLMOPT_PUSHFUNCTION') || 0x073d00 > ($v = curl_version())['version_number'] || !(CURL_VERSION_HTTP2 & $v['features'])) { + $this->markTestSkipped('curl <7.61 is used or it is not compiled with support for HTTP/2 PUSH'); } $logger = new class() extends AbstractLogger {