doc-en icon indicating copy to clipboard operation
doc-en copied to clipboard

Document new 8.2 curl constants

Open ekinhbayar opened this issue 2 years ago • 13 comments

Hi, thought I can help with #1803 regarding the curl constants. This PR starts with the curlinfo constants added in one commit. Made a list below, but I could use some pointers as to what goes where, which other pages need to be updated, if I'm missing any I had planned below.

  • [x] Updated constants list and getinfo options CURLINFO_PROXY_ERROR (libcurl >= 7.73.0) https://curl.se/libcurl/c/CURLINFO_PROXY_ERROR.html CURLINFO_REFERER (libcurl >= 7.76.0) https://curl.se/libcurl/c/CURLINFO_REFERER.html CURLINFO_RETRY_AFTER (libcurl >= 7.66.0) https://curl.se/libcurl/c/CURLINFO_RETRY_AFTER.html

  • [x] Update constants list CURL_VERSION_GSASL (libcurl >= 7.76.0) CURL_VERSION_HSTS (libcurl >= 7.74.0) CURL_VERSION_HTTP3 (libcurl >= 7.66.0) CURL_VERSION_UNICODE (libcurl >= 7.72.0) CURL_VERSION_ZSTD (libcurl >= 7.72.0)

  • [x] Update constants list and setopt options CURLAUTH_AWS_SIGV4 (libcurl >= 7.75.0) CURLOPT_AWS_SIGV4 (libcurl >= 7.75.0) https://curl.se/libcurl/c/CURLOPT_AWS_SIGV4.html CURLOPT_CAINFO_BLOB (libcurl >= 7.77.0) https://curl.se/libcurl/c/CURLOPT_CAINFO_BLOB.html CURLOPT_PROXY_CAINFO_BLOB (libcurl >= 7.77.0) https://curl.se/libcurl/c/CURLOPT_PROXY_CAINFO_BLOB.html CURLOPT_DOH_SSL_VERIFYHOST (libcurl >= 7.76.0) https://curl.se/libcurl/c/CURLOPT_DOH_SSL_VERIFYHOST.html CURLOPT_DOH_SSL_VERIFYPEER (libcurl >= 7.76.0) https://curl.se/libcurl/c/CURLOPT_DOH_SSL_VERIFYPEER.html CURLOPT_DOH_SSL_VERIFYSTATUS (libcurl >= 7.76.0) https://curl.se/libcurl/c/CURLOPT_DOH_SSL_VERIFYSTATUS.html

  • [x] Update constants list and setopt options CURLOPT_MAIL_RCPT_ALLLOWFAILS (libcurl >= 7.69.0) https://curl.se/libcurl/c/CURLOPT_MAIL_RCPT_ALLLOWFAILS.html CURLOPT_MAXAGE_CONN (libcurl >= 7.65.0) https://curl.se/libcurl/c/CURLOPT_MAXAGE_CONN.html CURLOPT_MAXFILESIZE_LARGE https://curl.se/libcurl/c/CURLOPT_MAXFILESIZE_LARGE.html CURLOPT_MAXLIFETIME_CONN (libcurl >= 7.80.0) https://curl.se/libcurl/c/CURLOPT_MAXLIFETIME_CONN.html CURLOPT_SASL_AUTHZID (libcurl >= 7.66.0) https://curl.se/libcurl/c/CURLOPT_SASL_AUTHZID.html CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256 (libcurl >= 7.80.0) https://curl.se/libcurl/c/CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256.html CURLOPT_SSL_EC_CURVES (libcurl >= 7.73.0) https://curl.se/libcurl/c/CURLOPT_SSL_EC_CURVES.html CURLOPT_UPKEEP_INTERVAL_MS (libcurl >= 7.62.0) https://curl.se/libcurl/c/CURLOPT_UPKEEP_INTERVAL_MS.html CURLOPT_UPLOAD_BUFFERSIZE (libcurl >= 7.62.0) https://curl.se/libcurl/c/CURLOPT_UPLOAD_BUFFERSIZE.html

  • [x] HSTS related CURLHSTS_ENABLE (libcurl >= 7.74.0) https://curl.se/libcurl/c/CURLOPT_HSTS_CTRL.html CURLHSTS_READONLYFILE (libcurl >= 7.74.0) https://curl.se/libcurl/c/CURLOPT_HSTS_CTRL.html CURLOPT_HSTS_CTRL (libcurl >= 7.74.0) https://curl.se/libcurl/c/CURLOPT_HSTS_CTRL.html CURLOPT_HSTS (libcurl >= 7.74.0) https://curl.se/libcurl/c/CURLOPT_HSTS.html

  • [x] Update constants list and setopt options CURLAUTH_AWS_SIGV4 (libcurl >= 7.75.0)

  • [x] alt_svc related CURLOPT_ALTSVC (libcurl >= 7.64.1) https://curl.se/libcurl/c/CURLOPT_ALTSVC.html CURLOPT_ALTSVC_CTRL (libcurl >= 7.64.1) https://curl.se/libcurl/c/CURLOPT_ALTSVC_CTRL.html CURLALTSVC_H1 (libcurl >= 7.64.1) CURLALTSVC_H2 (libcurl >= 7.64.1) CURLALTSVC_H3 (libcurl >= 7.64.1) CURLALTSVC_READONLYFILE (libcurl >= 7.64.1)

  • [x] PROTO_* CURLPROTO_MQTT (libcurl >= 7.71.0)

  • [x] PX_* responses when getting detailed socks proxy errors via CURLINFO_PROXY_ERROR - https://curl.se/libcurl/c/CURLINFO_PROXY_ERROR.html CURLPX_BAD_ADDRESS_TYPE (libcurl >= 7.73.0) CURLPX_BAD_VERSION (libcurl >= 7.73.0) CURLPX_CLOSED (libcurl >= 7.73.0) CURLPX_GSSAPI (libcurl >= 7.73.0) CURLPX_GSSAPI_PERMSG (libcurl >= 7.73.0) CURLPX_GSSAPI_PROTECTION (libcurl >= 7.73.0) CURLPX_IDENTD_DIFFER (libcurl >= 7.73.0) CURLPX_IDENTD (libcurl >= 7.73.0) CURLPX_LONG_HOSTNAME (libcurl >= 7.73.0) CURLPX_LONG_PASSWD (libcurl >= 7.73.0) CURLPX_LONG_USER (libcurl >= 7.73.0) CURLPX_NO_AUTH (libcurl >= 7.73.0) CURLPX_OK (libcurl >= 7.73.0) CURLPX_RECV_ADDRESS (libcurl >= 7.73.0) CURLPX_RECV_AUTH (libcurl >= 7.73.0) CURLPX_RECV_CONNECT (libcurl >= 7.73.0) CURLPX_RECV_REQACK (libcurl >= 7.73.0) CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED (libcurl >= 7.73.0) CURLPX_REPLY_COMMAND_NOT_SUPPORTED (libcurl >= 7.73.0) CURLPX_REPLY_CONNECTION_REFUSED (libcurl >= 7.73.0) CURLPX_REPLY_GENERAL_SERVER_FAILURE (libcurl >= 7.73.0) CURLPX_REPLY_HOST_UNREACHABLE (libcurl >= 7.73.0) CURLPX_REPLY_NETWORK_UNREACHABLE (libcurl >= 7.73.0) CURLPX_REPLY_NOT_ALLOWED (libcurl >= 7.73.0) CURLPX_REPLY_TTL_EXPIRED (libcurl >= 7.73.0) CURLPX_REPLY_UNASSIGNED (libcurl >= 7.73.0) CURLPX_REQUEST_FAILED (libcurl >= 7.73.0) CURLPX_RESOLVE_HOST (libcurl >= 7.73.0) CURLPX_SEND_AUTH (libcurl >= 7.73.0) CURLPX_SEND_CONNECT (libcurl >= 7.73.0) CURLPX_SEND_REQUEST (libcurl >= 7.73.0) CURLPX_UNKNOWN_FAIL (libcurl >= 7.73.0) CURLPX_UNKNOWN_MODE (libcurl >= 7.73.0) CURLPX_USER_REJECTED (libcurl >= 7.73.0)

  • [x] SSLOPT_* - update constants list and document on getinfo - https://curl.se/libcurl/c/CURLOPT_SSL_OPTIONS.html CURLSSLOPT_AUTO_CLIENT_CERT (libcurl >= 7.77.0) CURLSSLOPT_NATIVE_CA (libcurl >= 7.71.0) CURLSSLOPT_NO_PARTIALCHAIN (libcurl >= 7.68.0) CURLSSLOPT_REVOKE_BEST_EFFORT (libcurl >= 7.70.0)

  • [x] CURLE_PROXY (libcurl >= 7.73.0)

  • [x] CURLFTPMETHOD_DEFAULT

  • [x] CURLMOPT_MAX_CONCURRENT_STREAMS (libcurl >= 7.67.0)

ekinhbayar avatar Oct 23 '22 20:10 ekinhbayar

Did not update and curl_version page for the CURL_VERSION new flags, looks like we never kept the full list there.

ekinhbayar avatar Oct 24 '22 22:10 ekinhbayar

So other than the nits, the first 3 commits look good to me. The cURL manual is a mess so I'm not exactly sure where everything is meant to go, maybe @cmb69 knows?

Girgias avatar Nov 04 '22 12:11 Girgias

Thanks a ton for the reviews! They sure helped a lot. I'll be onto these changes this weekend and try my best to document more constants following the same notes and aim to sweep through most of these. Ps. I am keeping an eye on the main issue in case some of these get done before I get to, in which case I'll totally skip them.

ekinhbayar avatar Nov 04 '22 23:11 ekinhbayar

I realize some setopt entries define the versions available while others don't. What's the preference regarding this?

ekinhbayar avatar Nov 06 '22 19:11 ekinhbayar

I realize some setopt entries define the versions available while others don't. What's the preference regarding this?

I think if an entry is available in every cURL version past the minimal version for PHP 7.0 then the version availability can be skipped. Otherwise it should be mentioned.

Girgias avatar Nov 07 '22 00:11 Girgias

@Girgias, to make the white-space checker happy, you'd need to squash.

cmb69 avatar Nov 07 '22 14:11 cmb69

lol, I really thought one would be able to request review from multiple reviewers, sorry for all that ^^. I believe I finally powered through the remaining constants with the last couple commits here. Hoping we can re-trigger the checks :-)

ekinhbayar avatar Nov 08 '22 23:11 ekinhbayar

Thanks for the review and suffering through this one with me :-) I'll get those fixed tonight.

ekinhbayar avatar Nov 09 '22 16:11 ekinhbayar

E_TOO_MANY_CONSTANTS :(

cmb69 avatar Nov 09 '22 17:11 cmb69

Oh noes, I forgot that I used the interface to commit the changes prior to my force push @cmb69 :P which apparently completely nuked your suggested edit for a paragraph I can't remember which 😓 Edit: this one https://github.com/php/doc-en/pull/1911#discussion_r1017851464

ekinhbayar avatar Nov 09 '22 23:11 ekinhbayar

Permission to fix all the since to be as of in a single commit here? :') or should I wait this to be merged and then PR that like a normal person

ekinhbayar avatar Nov 10 '22 12:11 ekinhbayar

Permission to fix all the since to be as of in a single commit here? :') or should I wait this to be merged and then PR that like a normal person

Probably can do yes, this is going to be a pain for translators anyway since it is cURL. That's probably one of the smallest annoyances

Girgias avatar Nov 10 '22 12:11 Girgias

I think I will fix them all together on a separate PR, just like how I started on the PEM definition

ekinhbayar avatar Nov 10 '22 13:11 ekinhbayar

Apologies for the silence here, I think I had done all final suggestions on this branch. I can PR the other two fixes after this one individually. Let me know if I can help further to get these ones marked as done.

ekinhbayar avatar Jan 17 '23 16:01 ekinhbayar

@cmb69 ping. :)

Girgias avatar Feb 13 '23 01:02 Girgias

@ekinhbayar There is a failure on check-whitespace. Also, there is a change request from @Girgias. Do you need help with completing this?

afilina avatar Aug 02 '23 16:08 afilina

@afilina thanks for the ping! I'll take a look at both and move this forward.

ekinhbayar avatar Aug 07 '23 12:08 ekinhbayar

Ah, by the time I sat down for this it seems all has been resolved :-) thank you and sorry for this taking so, so long!

ekinhbayar avatar Aug 07 '23 21:08 ekinhbayar

Ah, by the time I sat down for this it seems all has been resolved :-) thank you and sorry for this taking so, so long!

It's fine the issues were minors, if you want to do the follow-up on the PEM acronym feel free!

Girgias avatar Aug 07 '23 21:08 Girgias