Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add default return value for CURLINFO_CERTINFO #286

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

clemherreman
Copy link

@clemherreman clemherreman commented Nov 7, 2019

Context

symfony/http-client is using the cURL CURLINFO_CERTINFO (see here)

However PHP-VCR is not handling this. By default, its value is [], unless a developer use this:

curl_setopt($ch, CURLOPT_CERTINFO, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 1);

What has been done

This PR allows curl_getinfo($ch, CURLINFO_CERTINFO) to return the default cURL value : [] when those curl_setopt are not set, instead of a PHP VCR Exception.

How to test

I added a test to CurlHelperTest, testing that calling curl_getinfo($ch, CURLINFO_CERTINFO) doesn't thrown an exception, but returns the default cURL value.

Notes

Build is failing because of PHP CS Fixer on files unrelated to this PR. As multiple PRs include that fix, I didn't run the fix again on this one :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant