-
Notifications
You must be signed in to change notification settings - Fork 7.9k
ext/curl: No-op CURLOPT_DNS_USE_GLOBAL_CACHE
constant
#15127
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
ext/curl: No-op CURLOPT_DNS_USE_GLOBAL_CACHE
constant
#15127
Conversation
Makes sense, note that centos 8 (the future centos minimum supported), curl version is 7.61.1 though. |
You are right I was concerned about CentOS/RHEL 8 usage too. Perhaps we can no-op it without a deprecation notice, and then deprecate it in a future version? |
Maybe you can gather some opinions on the mailing list ? |
edc432b
to
dfd1cd0
Compare
CURLOPT_DNS_USE_GLOBAL_CACHE
constantCURLOPT_DNS_USE_GLOBAL_CACHE
constant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
ext/curl/curl.stub.php
Outdated
const CURLOPT_DNS_USE_GLOBAL_CACHE = UNKNOWN; | ||
const CURLOPT_DNS_USE_GLOBAL_CACHE = -1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this to suppress a deprecation warning when building ext/curl against recent libcurl versions, or just a convention?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah. just seen #5094 (comment), so this is probably a good idea.
dfd1cd0
to
694dfe1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently, CURLOPT_SAFE_UPLOAD
has the value -1
, so I reverted the previous change that set the CURLOPT_DNS_USE_GLOBAL_CACHE
value to -1
.
Indeed, that appears to be best for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me.
694dfe1
to
40eb288
Compare
Friendly gentle ping to see we can go forward with this :) I emailed internals last month. It didn't receive a lot of responses, but there were no objections about changing this to no-op the constant. We can perhaps deprecate this in a future PHP version, hopefully as part of a bigger change to brush up all deprecated/obsolete options. |
Libcurl `CURLOPT_DNS_USE_GLOBAL_CACHE` constant is no longer supported since libcurl[^1] 7.62. This no-ops the constant, but without causing any deprecation notices. [^1]: [CURLOPT_DNS_USE_GLOBAL_CACHE](https://curl.se/libcurl/c/CURLOPT_DNS_USE_GLOBAL_CACHE.html)
40eb288
to
422255d
Compare
Thank you! |
Commit: php/php-src#15127 PHP.Watch: [PHP 8.4: Curl: `CURLOPT_DNS_USE_GLOBAL_CACHE` no longer has any effect](https://php.watch/versions/8.4/CURLOPT_DNS_USE_GLOBAL_CACHE-no-op)
Commit: php/php-src#15127 PHP.Watch: [PHP 8.4: Curl: `CURLOPT_DNS_USE_GLOBAL_CACHE` no longer has any effect](https://php.watch/versions/8.4/CURLOPT_DNS_USE_GLOBAL_CACHE-no-op)
Commit: php/php-src#15127 PHP.Watch: [PHP 8.4: Curl: `CURLOPT_DNS_USE_GLOBAL_CACHE` no longer has any effect](https://php.watch/versions/8.4/CURLOPT_DNS_USE_GLOBAL_CACHE-no-op)
Commit: php/php-src#15127 PHP.Watch: [PHP 8.4: Curl: `CURLOPT_DNS_USE_GLOBAL_CACHE` no longer has any effect](https://php.watch/versions/8.4/CURLOPT_DNS_USE_GLOBAL_CACHE-no-op)
Commit: php/php-src#15127 PHP.Watch: [PHP 8.4: Curl: `CURLOPT_DNS_USE_GLOBAL_CACHE` no longer has any effect](https://php.watch/versions/8.4/CURLOPT_DNS_USE_GLOBAL_CACHE-no-op)
LibcurlCURLOPT_DNS_USE_GLOBAL_CACHE
constant is no longer supported since libcurl1 7.62. This feature is also not thread-safe, and we have special handling to emit warnings if it's used in ZTS builds.Impact: Close to 1,100 hits on GitHub code search2Libcurl
CURLOPT_DNS_USE_GLOBAL_CACHE
constant is no longer supported since libcurl1 7.62. This no-ops the constant, but without causing any deprecation notices.Footnotes
CURLOPT_DNS_USE_GLOBAL_CACHE ↩ ↩2
GitHub code search:
CURLOPT_DNS_USE_GLOBAL_CACHE
↩