Skip to content

Replace <literal> nodes with <constant> for constants #2310

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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion appendices/migration70/changed-functions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<listitem>
<simpara>
<function>setlocale</function> function no longer accepts <parameter>category</parameter>
passed as string. <constant>LC_*</constant> constants must be used instead.
passed as string. <constant>LC_<replaceable>*</replaceable></constant> constants must be used instead.
</simpara>
</listitem>
<listitem>
Expand Down
2 changes: 1 addition & 1 deletion appendices/migration70/incompatible/removed-functions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<function>mcrypt_cbc</function>, <function>mcrypt_cfb</function> and
<function>mcrypt_ofb</function> functions have been removed in favour of
using <function>mcrypt_decrypt</function> with the appropriate
<constant>MCRYPT_MODE_*</constant> constant.
<constant>MCRYPT_MODE_<replaceable>*</replaceable></constant> constant.
</para>
</sect3>

Expand Down
2 changes: 1 addition & 1 deletion appendices/migration70/other-changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Project::new('Project Name')->private()->for('purpose here')->with('username her
<para>
The only limitation is that the <literal>class</literal> keyword still
cannot be used as a constant name, otherwise it would conflict with the
class name resolution syntax (<literal>ClassName::class</literal>).
class name resolution syntax (<constant>ClassName::class</constant>).
</para>
</sect2>

Expand Down
2 changes: 1 addition & 1 deletion appendices/migration80/other-changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<methodname>ZipArchive::addEmptyDir</methodname>, <methodname>ZipArchive::addFile</methodname>
and <methodname>ZipArchive::addFromString</methodname>
methods have a new <parameter>flags</parameter> argument. This allows managing name encoding
(<constant>ZipArchive::FL_ENC_*</constant>) and entry replacement
(<constant>ZipArchive::FL_ENC_<replaceable>*</replaceable></constant>) and entry replacement
(<constant>ZipArchive::FL_OVERWRITE</constant>).
</para>
</listitem>
Expand Down
6 changes: 3 additions & 3 deletions language-snippets.ent
Original file line number Diff line number Diff line change
Expand Up @@ -1233,7 +1233,7 @@ Passing untrusted data to this parameter is <emphasis>insecure</emphasis>, unles

<!ENTITY intl.locale-len.return '<para xmlns="http://docbook.org/ns/docbook">Returns &null; when the length of <parameter>locale</parameter> exceeds <constant>INTL_MAX_LOCALE_LEN</constant>.</para>'>

<!ENTITY intl.property.parameter '<para xmlns="http://docbook.org/ns/docbook">The Unicode property to lookup (see the <literal>IntlChar::PROPERTY_*</literal> constants).</para>'>
<!ENTITY intl.property.parameter '<para xmlns="http://docbook.org/ns/docbook">The Unicode property to lookup (see the <constant>IntlChar::PROPERTY_<replaceable>*</replaceable></constant> constants).</para>'>

<!ENTITY intl.property.example 'Testing different properties'>

Expand Down Expand Up @@ -1382,7 +1382,7 @@ encoding value will be used.</para>'>
<!ENTITY memcached.result.delete-multi '<para xmlns="http://docbook.org/ns/docbook">
Returns an array indexed by <parameter>keys</parameter>. Each element
is &true; if the corresponding key was deleted, or one of the
<constant>Memcached::RES_*</constant> constants if the corresponding deletion
<constant>Memcached::RES_<replaceable>*</replaceable></constant> constants if the corresponding deletion
failed.
</para>
<para xmlns="http://docbook.org/ns/docbook">
Expand Down Expand Up @@ -2076,7 +2076,7 @@ extensions in order to use these functions.</simpara>'>
<!-- APD Notes -->
<!ENTITY apd.debug-level.description '<varlistentry xmlns="http://docbook.org/ns/docbook"><term>
<parameter>debug_level</parameter></term><listitem><para>An integer which is formed by adding
together the <literal>XXX_TRACE</literal> constants.</para><para>It is not recommended
together the <constant><replaceable>*</replaceable>_TRACE</constant> constants.</para><para>It is not recommended
to use <constant>MEMORY_TRACE</constant>. It is very slow and does not appear to be accurate.
<constant>ASSIGNMENT_TRACE</constant> is not implemented yet.</para><para>To turn on all
functional traces (TIMING, FUNCTIONS, ARGS SUMMARY (like strace -c)) use the value 99</para>
Expand Down
16 changes: 8 additions & 8 deletions language/enumerations.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ enum Suit

<para>
This declaration creates a new enumerated type named <literal>Suit</literal>, which has
four and only four legal values: <literal>Suit::Hearts</literal>, <literal>Suit::Diamonds</literal>,
<literal>Suit::Clubs</literal>, and <literal>Suit::Spades</literal>. Variables may be assigned
four and only four legal values: <constant>Suit::Hearts</constant>, <constant>Suit::Diamonds</constant>,
<constant>Suit::Clubs</constant>, and <constant>Suit::Spades</constant>. Variables may be assigned
to one of those legal values. A function may be type checked against an enumerated type,
in which case only values of that type may be passed.
</para>
Expand Down Expand Up @@ -91,7 +91,7 @@ pick_a_card('Spades');
</para>

<para>
By default, cases are not intrinsically backed by a scalar value. That is, <literal>Suit::Hearts</literal>
By default, cases are not intrinsically backed by a scalar value. That is, <constant>Suit::Hearts</constant>
is not equal to <literal>"0"</literal>. Instead, each case is backed by a singleton object of that name. That means that:
</para>

Expand Down Expand Up @@ -897,8 +897,8 @@ function query($fields, $filter, SortOrder $order = SortOrder::Asc)
</programlisting>
<para>
The <literal>query()</literal> function can now proceed safe in the knowledge that
<literal>$order</literal> is guaranteed to be either <literal>SortOrder::Asc</literal>
or <literal>SortOrder::Desc</literal>. Any other value would have resulted in a
<literal>$order</literal> is guaranteed to be either <constant>SortOrder::Asc</constant>
or <constant>SortOrder::Desc</constant>. Any other value would have resulted in a
<classname>TypeError</classname>, so no further error checking or testing is needed.
</para>
</example>
Expand Down Expand Up @@ -935,9 +935,9 @@ enum UserStatus: string
</programlisting>

<para>
In this example, a user's status may be one of, and exclusively, <literal>UserStatus::Pending</literal>,
<literal>UserStatus::Active</literal>, <literal>UserStatus::Suspended</literal>, or
<literal>UserStatus::CanceledByUser</literal>. A function can type a parameter against
In this example, a user's status may be one of, and exclusively, <constant>UserStatus::Pending</constant>,
<constant>UserStatus::Active</constant>, <constant>UserStatus::Suspended</constant>, or
<constant>UserStatus::CanceledByUser</constant>. A function can type a parameter against
<literal>UserStatus</literal> and then only accept those four values, period.
</para>

Expand Down
2 changes: 1 addition & 1 deletion language/oop5/basic.xml
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ Stack trace:
The <literal>class</literal> keyword is also used for class
name resolution.
To obtain the fully qualified name of a class <literal>ClassName</literal>
use <literal>ClassName::class</literal>. This is particularly useful with
use <constant>ClassName::class</constant>. This is particularly useful with
<link linkend="language.namespaces">namespaced</link> classes.
</para>
<para>
Expand Down
2 changes: 1 addition & 1 deletion reference/com/functions/variant-cast.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<listitem>
<para>
<parameter>type</parameter> should be one of the
<constant>VT_XXX</constant> constants.
<constant>VT_<replaceable>*</replaceable></constant> constants.
</para>
</listitem>
</varlistentry>
Expand Down
2 changes: 1 addition & 1 deletion reference/com/functions/variant-get-type.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<parameter>variant</parameter>, which can be an instance of
<xref linkend="class.com"/>, <xref linkend="class.dotnet"/> or
<xref linkend="class.variant"/> classes. The return value can be compared
to one of the <constant>VT_XXX</constant> constants.
to one of the <constant>VT_<replaceable>*</replaceable></constant> constants.
</para>
<para>
The return value for COM and DOTNET objects will usually be
Expand Down
2 changes: 1 addition & 1 deletion reference/com/variant/construct.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<listitem>
<simpara>
Specifies the content type of the variant object. Possible values are
one of the <constant>VT_XXX</constant> <xref
one of the <constant>VT_<replaceable>*</replaceable></constant> <xref
linkend="com.constants"/>.
</simpara>
<simpara>
Expand Down
2 changes: 1 addition & 1 deletion reference/curl/functions/curl-multi-add-handle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns 0 on success, or one of the <constant>CURLM_XXX</constant> errors
Returns 0 on success, or one of the <constant>CURLM_<replaceable>*</replaceable></constant> errors
code.
</para>
</refsect1>
Expand Down
2 changes: 1 addition & 1 deletion reference/curl/functions/curl-multi-info-read.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
</row>
<row>
<entry><literal>result</literal></entry>
<entry>One of the <constant>CURLE_*</constant> constants. If everything is
<entry>One of the <constant>CURLE_<replaceable>*</replaceable></constant> constants. If everything is
OK, the <constant>CURLE_OK</constant> will be the result.</entry>
</row>
<row>
Expand Down
2 changes: 1 addition & 1 deletion reference/curl/functions/curl-multi-remove-handle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns 0 on success, or one of the <constant>CURLM_XXX</constant> error
Returns 0 on success, or one of the <constant>CURLM_<replaceable>*</replaceable></constant> error
codes.
</para>
</refsect1>
Expand Down
2 changes: 1 addition & 1 deletion reference/curl/functions/curl-multi-setopt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<term><parameter>option</parameter></term>
<listitem>
<para>
One of the <constant>CURLMOPT_*</constant> constants.
One of the <constant>CURLMOPT_<replaceable>*</replaceable></constant> constants.
</para>
</listitem>
</varlistentry>
Expand Down
2 changes: 1 addition & 1 deletion reference/curl/functions/curl-pause.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<term><parameter>flags</parameter></term>
<listitem>
<para>
One of <constant>CURLPAUSE_*</constant> constants.
One of <constant>CURLPAUSE_<replaceable>*</replaceable></constant> constants.
</para>
</listitem>
</varlistentry>
Expand Down
12 changes: 6 additions & 6 deletions reference/curl/functions/curl-setopt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<term><parameter>option</parameter></term>
<listitem>
<para>
The <literal>CURLOPT_XXX</literal> option to set.
The <constant>CURLOPT_<replaceable>*</replaceable></constant> option to set.
</para>
</listitem>
</varlistentry>
Expand Down Expand Up @@ -889,7 +889,7 @@
<entry valign="top"><constant>CURLOPT_PROTOCOLS</constant></entry>
<entry valign="top">
<para>
Bitmask of <constant>CURLPROTO_*</constant> values. If used, this bitmask
Bitmask of <constant>CURLPROTO_<replaceable>*</replaceable></constant> values. If used, this bitmask
limits what protocols libcurl may use in the transfer. This allows you to have
a libcurl built to support a wide range of protocols but still limit specific
transfers to only be allowed to use a subset of them. By default libcurl will
Expand Down Expand Up @@ -956,7 +956,7 @@
<row>
<entry valign="top"><constant>CURLOPT_REDIR_PROTOCOLS</constant></entry>
<entry valign="top">
Bitmask of <constant>CURLPROTO_*</constant> values. If used, this bitmask
Bitmask of <constant>CURLPROTO_<replaceable>*</replaceable></constant> values. If used, this bitmask
limits what protocols libcurl may use in a transfer that it follows to in
a redirect when <constant>CURLOPT_FOLLOWLOCATION</constant> is enabled.
This allows you to limit specific transfers to only be allowed to use a subset
Expand Down Expand Up @@ -1075,9 +1075,9 @@
<constant>CURL_SSLVERSION_TLSv1_1</constant> (5),
<constant>CURL_SSLVERSION_TLSv1_2</constant> (6) or
<constant>CURL_SSLVERSION_TLSv1_3</constant> (7).
The maximum TLS version can be set by using one of the <constant>CURL_SSLVERSION_MAX_*</constant>
constants. It is also possible to OR one of the <constant>CURL_SSLVERSION_*</constant>
constants with one of the <constant>CURL_SSLVERSION_MAX_*</constant> constants.
The maximum TLS version can be set by using one of the <constant>CURL_SSLVERSION_MAX_<replaceable>*</replaceable></constant>
constants. It is also possible to OR one of the <constant>CURL_SSLVERSION_<replaceable>*</replaceable></constant>
constants with one of the <constant>CURL_SSLVERSION_MAX_<replaceable>*</replaceable></constant> constants.
<constant>CURL_SSLVERSION_MAX_DEFAULT</constant> (the maximum version supported by the library),
<constant>CURL_SSLVERSION_MAX_TLSv1_0</constant>,
<constant>CURL_SSLVERSION_MAX_TLSv1_1</constant>,
Expand Down
2 changes: 1 addition & 1 deletion reference/curl/functions/curl-version.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
</row>
<row>
<entry>features</entry>
<entry>A bitmask of the <literal>CURL_VERSION_XXX</literal> constants</entry>
<entry>A bitmask of the <constant>CURL_VERSION_<replaceable>*</replaceable></constant> constants</entry>
</row>
<row>
<entry>protocols</entry>
Expand Down
2 changes: 1 addition & 1 deletion reference/datetime/datetimezone/listidentifiers.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<para>
Returns the array of timezone identifiers. Only non-outdated items are
returned. To get all, including outdated timezone identifiers, use the
<literal>DateTimeZone::ALL_WITH_BC</literal> as value for
<constant>DateTimeZone::ALL_WITH_BC</constant> as value for
<parameter>timezoneGroup</parameter>.
</para>
</refsect1>
Expand Down
2 changes: 1 addition & 1 deletion reference/event/eventbase/loop.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<listitem>
<para>
Optional flags. One of
<literal>EventBase::LOOP_*</literal>
<constant>EventBase::LOOP_<replaceable>*</replaceable></constant>
constants. See
<link linkend="eventbase.constants">EventBase constants</link>
.
Expand Down
2 changes: 1 addition & 1 deletion reference/event/eventbufferevent/connecthost.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
Resolves the DNS name hostname, looking for addresses of type
<parameter>family</parameter>
(
<literal>EventUtil::AF_*</literal>
<constant>EventUtil::AF_<replaceable>*</replaceable></constant>
constants). If the name resolution fails, it invokes the event callback
with an error event. If it succeeds, it launches a connection attempt just
as
Expand Down
2 changes: 1 addition & 1 deletion reference/event/eventconfig/requirefeatures.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
Bitmask of required features. See
<link
linkend="eventconfig.constants">
<literal>EventConfig::FEATURE_*</literal> constants</link>
<constant>EventConfig::FEATURE_<replaceable>*</replaceable></constant> constants</link>
</para>
</listitem>
</varlistentry>
Expand Down
2 changes: 1 addition & 1 deletion reference/event/eventconfig/setflags.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</term>
<listitem>
<para>
One of <literal>EventBase::LOOP_*</literal> constants.
One of <constant>EventBase::LOOP_<replaceable>*</replaceable></constant> constants.
See <link linkend="eventbase.constants">EventBase constants</link>.
</para>
</listitem>
Expand Down
4 changes: 2 additions & 2 deletions reference/event/eventhttp/setallowedmethods.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
,
<literal>DELETE</literal>
. See
<literal>EventHttpRequest::CMD_*</literal>
<constant>EventHttpRequest::CMD_<replaceable>*</replaceable></constant>
constants.
</para>
</refsect1>
Expand All @@ -54,7 +54,7 @@
A bit mask of
<link
linkend="eventhttprequest.constants">
<literal>EventHttpRequest::CMD_*</literal>
<constant>EventHttpRequest::CMD_<replaceable>*</replaceable></constant>
constants</link>
.
</para>
Expand Down
4 changes: 2 additions & 2 deletions reference/event/eventhttpconnection/makerequest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
Makes an HTTP request over the specified connection.
<parameter>type</parameter>
is one of
<literal>EventHttpRequest::CMD_*</literal>
<constant>EventHttpRequest::CMD_<replaceable>*</replaceable></constant>
constants.
</para>
</refsect1>
Expand All @@ -53,7 +53,7 @@
<para>
One of
<link linkend="eventhttprequest.constants">
<literal>EventHttpRequest::CMD_*</literal> constants</link>
<constant>EventHttpRequest::CMD_<replaceable>*</replaceable></constant> constants</link>
.
</para>
</listitem>
Expand Down
2 changes: 1 addition & 1 deletion reference/event/eventhttprequest/addheader.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<para>
One of
<link linkend="eventhttprequest.constants">
<literal>EventHttpRequest::*_HEADER</literal> constants</link>
<constant>EventHttpRequest::*_HEADER</constant> constants</link>
.
</para>
</listitem>
Expand Down
2 changes: 1 addition & 1 deletion reference/event/eventhttprequest/findheader.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<para>
One of
<link linkend="eventhttprequest.constants">
<literal>EventHttpRequest::*_HEADER</literal> constants</link>
<constant>EventHttpRequest::*_HEADER</constant> constants</link>
.
</para>
</listitem>
Expand Down
4 changes: 2 additions & 2 deletions reference/event/eventhttprequest/getcommand.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
Returns the request command, one of
<link
linkend="eventhttprequest.constants">
<literal>EventHttpRequest::CMD_*</literal>
<constant>EventHttpRequest::CMD_<replaceable>*</replaceable></constant>
</link>
constants.
</para>
Expand All @@ -32,7 +32,7 @@
Returns the request command, one of
<link
linkend="eventhttprequest.constants">
<literal>EventHttpRequest::CMD_*</literal>
<constant>EventHttpRequest::CMD_<replaceable>*</replaceable></constant>
</link>
constants.
</para>
Expand Down
2 changes: 1 addition & 1 deletion reference/event/eventhttprequest/removeheader.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<para>
<parameter>type</parameter>
is one of
<literal>EventHttpRequest::*_HEADER</literal>
<constant>EventHttpRequest::*_HEADER</constant>
constants.
</para>
</listitem>
Expand Down
2 changes: 1 addition & 1 deletion reference/event/eventlistener/construct.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<listitem>
<para>
Bit mask of
<literal>EventListener::OPT_*</literal>
<constant>EventListener::OPT_<replaceable>*</replaceable></constant>
constants. See
<link linkend="eventlistener.constants">EventListener constants</link>
.
Expand Down
4 changes: 2 additions & 2 deletions reference/event/eventsslcontext/construct.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<para>
One of
<link linkend="eventsslcontext.constants">
<literal>EventSslContext::*_METHOD</literal> constants</link>
<constant>EventSslContext::<replaceable>*</replaceable>_METHOD</constant> constants</link>
.
</para>
</listitem>
Expand All @@ -50,7 +50,7 @@
Associative array of SSL context options One of
<link
linkend="eventsslcontext.constants">
<literal>EventSslContext::OPT_*</literal> constants</link>
<constant>EventSslContext::OPT_<replaceable>*</replaceable></constant> constants</link>
.
</para>
</listitem>
Expand Down
2 changes: 1 addition & 1 deletion reference/event/eventutil/setsocketoption.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<listitem>
<para>
One of
<literal>EventUtil::SOL_*</literal>
<constant>EventUtil::SOL_<replaceable>*</replaceable></constant>
constants. Specifies the protocol level at which the option resides. For
example, to retrieve options at the socket level, a
<parameter>level</parameter>
Expand Down
Loading