Fixed #480 IP could not resolve IPv6#635
Merged
Merged
Conversation
alif
reviewed
Mar 1, 2024
| if (array_key_exists('ca_cert_path', $opts)) { | ||
| $this->caCertPath = $opts['ca_cert_path']; | ||
| } | ||
| if (array_key_exists('ip_resolve', $opts) |
Collaborator
Author
There was a problem hiding this comment.
I added some tests to ensure that the value is set. I usually try to avoid testing private properties since they are generally assumed to be safe to refactor. So, I added a comment to the test in case it fails in the future because of some sort of refactoring.
There was a problem hiding this comment.
I approved the PR but it looks like tests are failing.
alif
previously approved these changes
Mar 1, 2024
alif
approved these changes
Mar 1, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the change
This fixes issue #480. It adds an optional config parameter
ip_resolvethat can be given one of theCURL_IPRESOLVE_*constants. Unless this config parameter is included the SDK will function entirely as before resolving with IPv4. This is not a breaking change.Note: Unfortunately, the PHP curl extension does not allow the retrieval of the value of this option once set. There is also no clear and consistently testable side effect that could be tested without introducing flaky tests. I tried a couple different methods but was unable to get consistent results. Because of that no new tests have been written.
Type of change
Related issues
Checklists
Development
Code review