Skip to content

Commit 1ad3413

Browse files
Support for ssl requests in some edge cases like paypal php sdk
1 parent c482b6e commit 1ad3413

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/VCR/Util/CurlHelper.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ public static function getCurlOptionFromResponse(Response $response, int $option
111111
case CURLINFO_HEADER_SIZE:
112112
$info = mb_strlen(HttpUtil::formatAsStatusWithHeadersString($response), 'ISO-8859-1');
113113
break;
114+
case CURLPROXY_HTTPS:
115+
$info = '';
116+
break;
114117
default:
115118
$info = $response->getCurlInfo(self::$curlInfoList[$option]);
116119
break;

src/VCR/VCRFactory.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ class VCRFactory
3232
protected function __construct(Configuration $config = null)
3333
{
3434
$this->config = $config ?: $this->getOrCreate('VCR\Configuration');
35+
36+
// This constant exists only from PHP 7.3
37+
// Once we are no longer supporting 7.2, we can remove this
38+
defined('CURLPROXY_HTTPS') or define('CURLPROXY_HTTPS', 2);
3539
}
3640

3741
protected function createVCRVideorecorder(): Videorecorder

0 commit comments

Comments
 (0)