1
0
mirror of https://github.com/php/doc-en.git synced 2026-03-23 23:32:18 +01:00

Fix return type for 5 misc functions: bool -> true (#5357)

* Fix return type for 5 functions: bool -> true

These functions always return true (or throw on error):
- finfo_close (fileinfo)
- ftp_set_option (ftp)
- libxml_set_external_entity_loader (libxml)
- shm_detach (shmop)
- array_multisort (standard)

* Add changelog entries for return type change bool -> true

* Fix changelog version: use 8.5.0 instead of entity hardcoded to 8.2.0

The &return.type.true; entity is hardcoded with version 8.2.0, but all
5 functions changed their return type from bool to true in PHP 8.5.
Replace the entity with manual changelog rows using the correct version.
This commit is contained in:
Louis-Arnaud
2026-03-02 22:55:02 +01:00
committed by GitHub
parent 7d5c74c9a5
commit 5b7646656e
5 changed files with 72 additions and 13 deletions

View File

@@ -8,7 +8,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>array_multisort</methodname>
<type>true</type><methodname>array_multisort</methodname>
<methodparam><type>array</type><parameter role="reference">array1</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>array1_sort_order</parameter><initializer>SORT_ASC</initializer></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>array1_sort_flags</parameter><initializer>SORT_REGULAR</initializer></methodparam>
@@ -118,10 +118,32 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
&return.true.always;
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.5.0</entry>
<entry>
The return type is &true; now; previously, it was <type>bool</type>.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>

View File

@@ -13,7 +13,7 @@
&reftitle.description;
<methodsynopsis>
<modifier role="attribute">#[\Deprecated]</modifier>
<type>bool</type><methodname>finfo_close</methodname>
<type>true</type><methodname>finfo_close</methodname>
<methodparam><type>finfo</type><parameter>finfo</parameter></methodparam>
</methodsynopsis>
@@ -36,7 +36,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<simpara>
&return.success;
&return.true.always;
</simpara>
</refsect1>
@@ -57,6 +57,12 @@
This function has been deprecated.
</entry>
</row>
<row>
<entry>8.5.0</entry>
<entry>
The return type is &true; now; previously, it was <type>bool</type>.
</entry>
</row>
<row>
<entry>8.1.0</entry>
<entry>

View File

@@ -8,7 +8,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>ftp_set_option</methodname>
<type>true</type><methodname>ftp_set_option</methodname>
<methodparam><type>FTP\Connection</type><parameter>ftp</parameter></methodparam>
<methodparam><type>int</type><parameter>option</parameter></methodparam>
<methodparam><type class="union"><type>int</type><type>bool</type></type><parameter>value</parameter></methodparam>
@@ -81,10 +81,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns &true; if the option could be set; &false; if not. A warning
message will be thrown if the <parameter>option</parameter> is not
supported or the passed <parameter>value</parameter> doesn't match the
expected value for the given <parameter>option</parameter>.
&return.true.always;
</para>
</refsect1>
@@ -99,6 +96,12 @@
</row>
</thead>
<tbody>
<row>
<entry>8.5.0</entry>
<entry>
The return type is &true; now; previously, it was <type>bool</type>.
</entry>
</row>
&ftp.changelog.ftp-param;
</tbody>
</tgroup>

View File

@@ -9,7 +9,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>libxml_set_external_entity_loader</methodname>
<type>true</type><methodname>libxml_set_external_entity_loader</methodname>
<methodparam><type class="union"><type>callable</type><type>null</type></type><parameter>resolver_function</parameter></methodparam>
</methodsynopsis>
<para>
@@ -72,10 +72,32 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
&return.true.always;
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.5.0</entry>
<entry>
The return type is &true; now; previously, it was <type>bool</type>.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>

View File

@@ -9,7 +9,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>shm_detach</methodname>
<type>true</type><methodname>shm_detach</methodname>
<methodparam><type>SysvSharedMemory</type><parameter>shm</parameter></methodparam>
</methodsynopsis>
<simpara>
@@ -37,7 +37,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<simpara>
&return.success;
&return.true.always;
</simpara>
</refsect1>
@@ -52,6 +52,12 @@
</row>
</thead>
<tbody>
<row>
<entry>8.5.0</entry>
<entry>
The return type is &true; now; previously, it was <type>bool</type>.
</entry>
</row>
<row>
<entry>8.0.0</entry>
<entry>