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

Update CURLOPT constant descriptions #3818

Merged
merged 3 commits into from
Oct 27, 2024

Conversation

haszi
Copy link
Contributor

@haszi haszi commented Oct 1, 2024

Updated descriptions of CURLOPT_* constants with the following:

  • added some missing descriptions
  • added type information on the associated accepted values
  • added default values
  • added cURL version information on availability, deprecation, removal
  • added applicable DocBook tags
  • replaced lists of accepted value constants with their generalized version (eg. CURLALTSVC_* instead of listing all CURLALTSVC_ constants individually)
  • standardized minor style details (e.g. use cURL instead of curl, libcurl, CURL; sentences to end in a period; remove double quotes from within <literal> tags, etc.)

Unfortunately since CURLOPT constants are the biggest subset of all cURL constants, the diff is pretty big.

Copy link
Member

@cmb69 cmb69 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, a lot of work. Thank you!

Just left a couple of notes, before CURLE_OPERATION_TIMEOUTED. :)

reference/curl/constants_curl_setopt.xml Outdated Show resolved Hide resolved
@@ -127,10 +130,10 @@
</term>
<listitem>
<para>
Provides AWS V4 signature authentication on HTTP(S) header.
Provides AWS V4 signature authentication on HTTP(S) header as a <type>string</type>.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also use &string;, but <type>string</type> might be preferred nowadays.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only reason I didn't use the entities is that there are only a few hundred uses of them in doc-en but thousands of uses of the <type> tags.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I remember correctly, we deliberately decided to not use the entities in the function signatures (where <type>string</type> is supposed to occur often).

Maybe @Girgias knows whether it's preferable to use type elements or the respective entities elsewhere.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is better to use the <type> element, as some translations translate the entity (don't ask me why doc-fr does it, but it does).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the same reasoning, they can translate the element as well. And soon we're back to

beschneide(zeichenkette $zeichenkette, zeichenkette $zeichen = " \n\r\t\v\x00"): zeichenkette

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure some of the QA scripts that can be used for translation check this. Usually the entity is better used when we want to talk about the "concept" of a string (or other type) rather then directly referring to it as a PHP type.

But the distinction is not useful most of the time. So maybe we should just fix translations that do that.

reference/curl/constants_curl_setopt.xml Outdated Show resolved Hide resolved
Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There also seems to be missing a bunch of patch versions for cURL availability (mainly 7.1)

reference/curl/constants_curl_setopt.xml Outdated Show resolved Hide resolved
reference/curl/constants_curl_setopt.xml Outdated Show resolved Hide resolved
reference/curl/constants_curl_setopt.xml Outdated Show resolved Hide resolved
reference/curl/constants_curl_setopt.xml Outdated Show resolved Hide resolved
reference/curl/constants_curl_setopt.xml Outdated Show resolved Hide resolved
reference/curl/constants_curl_setopt.xml Outdated Show resolved Hide resolved
reference/curl/constants_curl_setopt.xml Outdated Show resolved Hide resolved
reference/curl/constants_curl_setopt.xml Outdated Show resolved Hide resolved
reference/curl/constants_curl_setopt.xml Outdated Show resolved Hide resolved
reference/curl/constants_curl_setopt.xml Outdated Show resolved Hide resolved
@haszi
Copy link
Contributor Author

haszi commented Oct 19, 2024

I think I have addressed all review comments such as:

  • removed line wrap changes (all that I could find)
  • added cURL .0 patch version numbers
  • replaced callback descriptions with <methodsynopsis> elements
  • clarified that CURLOPT_BUFFERSIZE is currently 16KB (ie. can change)
  • replaced tab with spaces
  • added missing whitespace
  • removed line break between </simplelist> tags and periods
  • clarified that deprecation for CURLOPT_RANDOM_FILE is the cURL version number

@haszi haszi requested review from Girgias and cmb69 October 19, 2024 17:52
Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like we got rid of some semantic breaks :/

reference/curl/constants_curl_setopt.xml Outdated Show resolved Hide resolved
reference/curl/constants_curl_setopt.xml Outdated Show resolved Hide resolved
reference/curl/constants_curl_setopt.xml Outdated Show resolved Hide resolved
reference/curl/constants_curl_setopt.xml Show resolved Hide resolved
Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Readding semantic breaks where we are already editing it so it affects translations anyway

reference/curl/constants_curl_setopt.xml Outdated Show resolved Hide resolved
reference/curl/constants_curl_setopt.xml Outdated Show resolved Hide resolved
reference/curl/constants_curl_setopt.xml Outdated Show resolved Hide resolved
reference/curl/constants_curl_setopt.xml Outdated Show resolved Hide resolved
reference/curl/constants_curl_setopt.xml Outdated Show resolved Hide resolved
reference/curl/constants_curl_setopt.xml Outdated Show resolved Hide resolved
reference/curl/constants_curl_setopt.xml Outdated Show resolved Hide resolved
reference/curl/constants_curl_setopt.xml Outdated Show resolved Hide resolved
reference/curl/constants_curl_setopt.xml Outdated Show resolved Hide resolved
reference/curl/constants_curl_setopt.xml Outdated Show resolved Hide resolved
@Girgias Girgias merged commit fb2b760 into php:master Oct 27, 2024
2 checks passed
@haszi haszi deleted the Update-CURLOPT-constant-descriptions branch October 27, 2024 12:08
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.

3 participants