Skip to content

Rewrite SoapClient constructor documentation #537

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

IMSoP
Copy link
Collaborator

@IMSoP IMSoP commented Apr 19, 2021

This constructor takes a large number of options, most of which
were effectively undocumented, leading to a very high volume of
User Notes. Some examples and caveats from these notes have been
incorporated.

The descriptions here are largely based on reverse-engineering
the source code (which isn't particularly well commented) and
experimenting locally, so may not be 100% accurate, or capture
differences between versions.

@IMSoP IMSoP force-pushed the soapclient-constructor-rewrite branch from 8d3e513 to 8d1db39 Compare April 19, 2021 20:49
@afilina afilina marked this pull request as draft August 6, 2021 14:35
@IMSoP IMSoP force-pushed the soapclient-constructor-rewrite branch from 28b193c to cf4092e Compare March 20, 2022 22:52
@IMSoP IMSoP force-pushed the soapclient-constructor-rewrite branch from cf4092e to 9845255 Compare April 4, 2022 21:34
This constructor takes a large number of options, most of which
were effectively undocumented, leading to a very high volume of
User Notes. Some examples and caveats from these notes have been
incorporated.

The descriptions here are largely based on reverse-engineering
the source code (which isn't particularly well commented) and
experimenting locally, so may not be 100% accurate, or capture
differences between versions.
@IMSoP IMSoP force-pushed the soapclient-constructor-rewrite branch from 8791d10 to 8a29bad Compare April 9, 2022 18:36
@IMSoP IMSoP changed the title [WIP] Rewrite SoapClient constructor documentation Rewrite SoapClient constructor documentation Apr 9, 2022
@IMSoP IMSoP marked this pull request as ready for review April 9, 2022 18:41
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.

Thank you for the PR! I very welcome improvement.

<entry>
Used with the deprecated
<link linkend="soapclient.construct.options.ssl-method">
<parameter>ssl_method</parameter> option</link>
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 not happy with the indentation here. I think the </link> should go on an own line, or the two lines should be joined (a bit long, but okay-ish). The same indentation occurs several times below.

@@ -27,15 +26,17 @@
<term><parameter>wsdl</parameter></term>
<listitem>
<para>
URI of the <literal>WSDL</literal> file or &null; if working in
<literal>non-WSDL</literal> mode.
URI of a WSDL file describing the service, which is used to automatically
Copy link
Member

Choose a reason for hiding this comment

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

We could mark-up WSDL as acronym (<acronym>WSDL</acronym>), although that wouln't do much, unless we'd actually define the acronym in https://github.com/php/doc-base/blob/master/entities/acronyms.xml.

<variablelist>
<varlistentry xml:id="soapclient.construct.options.location">
<term>
<parameter>location</parameter>
Copy link
Member

Choose a reason for hiding this comment

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

While it is not uncommon in the manual to use <parameter> for non-parameters, I don't think we should add more of this. A particular issue is that <parameter> tries to create a JS link to an actual parameter with that name. Instead of <parameter>, I suggest to use <literal> here (and below):

Suggested change
<parameter>location</parameter>
<literal>location</literal>

Comment on lines +203 to +204
It must be a PEM encoded file which contains your certificate
and private key.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
It must be a PEM encoded file which contains your certificate
and private key.
It must be a PEM encoded file which contains the certificate
and private key.

Comment on lines +355 to +356
Note that the type names of an element is not necessarily the same as
the element (tag) name.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Note that the type names of an element is not necessarily the same as
the element (tag) name.
Note that the type name of an element is not necessarily the same as
the element (tag) name.

or SSL 3, respectively.
Specifying <constant>SOAP_SSL_METHOD_SSLv23</constant> has no effect;
the constant exists only for backwards compatibility.
As of PHP 7.2, specifying <constant>SOAP_SSL_METHOD_TLS</constant>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
As of PHP 7.2, specifying <constant>SOAP_SSL_METHOD_TLS</constant>
As of PHP 7.2.0, specifying <constant>SOAP_SSL_METHOD_TLS</constant>

be supported by the installed OpenSSL library.
</para>
<para>
This option is <emphasis>DEPRECATED</emphasis> as of PHP 8.1.0.
Copy link
Member

Choose a reason for hiding this comment

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

I detest "shouting":

Suggested change
This option is <emphasis>DEPRECATED</emphasis> as of PHP 8.1.0.
This option is <emphasis>deprecated</emphasis> as of PHP 8.1.0.

or

Suggested change
This option is <emphasis>DEPRECATED</emphasis> as of PHP 8.1.0.
This option is <emphasis role="strong">deprecated</emphasis> as of PHP 8.1.0.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

While I agree in general, this particular combination is effectively standard style, because it's what's used in the entities in language-snippets.ent, and about a dozen other places.

There are only two instances of <emphasis>deprecated</emphasis> in the entire manual, and none at all of <emphasis role="strong">deprecated</emphasis> or DEPRECATED without any markup (except when mentioning the constant E_DEPRECATED).

I think if we want to standardise on a less shouty style, we should pick one and use it consistently.

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 aware (and not pleased) that we use upper case in the language-snippets, but changing that is additional effort for translators (well, not really much effort). I wouldn't want to add more shouting, though.

<link linkend="soapclient.construct.options.stream-context">
<parameter>stream_context</parameter></link> option with
the 'crypto_method' context parameter.
<example>
Copy link
Member

Choose a reason for hiding this comment

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

It might be better to use an <informalexample> here (since <example>s are numbered). That wouldn't accept a title, though.

@afilina
Copy link
Contributor

afilina commented Dec 22, 2022

@IMSoP Pinging author

@IMSoP
Copy link
Collaborator Author

IMSoP commented Dec 22, 2022

It looks like @cmb69 merged this manually at the time, despite the comments: 6105da1

I'll leave this PR open as a reminder, and if I get time, will raise a new PR with the suggested improvements.

@cmb69
Copy link
Member

cmb69 commented Dec 22, 2022

It looks like @cmb69 merged this manually at the time, despite the comments: 6105da1

Ugh, that might have been by accident. Anyway, since it has been committed and likely already been translated, leaving as is might be the best option.

@afilina
Copy link
Contributor

afilina commented Aug 2, 2023

I'll leave this PR open as a reminder, and if I get time, will raise a new PR with the suggested improvements.

@IMSoP Might you have the time to raise the new PR?

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

Successfully merging this pull request may close these issues.

4 participants