[DOC-CVS] [doc-en] master: Fix return type for 5 misc functions: bool -> true (#5357)

[email protected] (Louis-Arnaud via GitHub) Mon, 2 Mar 2026 21:55:04 +0000
Newsgroups php.doc.cvs
Message-ID <[email protected]>
Author: Louis-Arnaud (lacatoire)
Committer: GitHub (web-flow)
Pusher: ndossche
Date: 2026-03-02T22:55:02+01:00

Commit: https://github.com/php/doc-en/commit/5b7646656eb183ea568b8261d6d87a10a1b961c7
Raw diff: https://github.com/php/doc-en/commit/5b7646656eb183ea568b8261d6d87a10a1b961c7.diff

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.

Changed paths:
  M  reference/array/functions/array-multisort.xml
  M  reference/fileinfo/functions/finfo-close.xml
  M  reference/ftp/functions/ftp-set-option.xml
  M  reference/libxml/functions/libxml-set-external-entity-loader.xml
  M  reference/sem/functions/shm-detach.xml


Diff:

diff --git a/reference/array/functions/array-multisort.xml b/reference/array/functions/array-multisort.xml
index e45e7cc51b83..769e6629abd4 100644
--- a/reference/array/functions/array-multisort.xml
+++ b/reference/array/functions/array-multisort.xml
@@ -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>
diff --git a/reference/fileinfo/functions/finfo-close.xml b/reference/fileinfo/functions/finfo-close.xml
index ee6f5111ce85..3a9ee23f3fa1 100644
--- a/reference/fileinfo/functions/finfo-close.xml
+++ b/reference/fileinfo/functions/finfo-close.xml
@@ -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>
diff --git a/reference/ftp/functions/ftp-set-option.xml b/reference/ftp/functions/ftp-set-option.xml
index 437aea2d8a91..02086da15cb1 100644
--- a/reference/ftp/functions/ftp-set-option.xml
+++ b/reference/ftp/functions/ftp-set-option.xml
@@ -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>
diff --git a/reference/libxml/functions/libxml-set-external-entity-loader.xml b/reference/libxml/functions/libxml-set-external-entity-loader.xml
index 006c741bd715..fcff518c25b6 100644
--- a/reference/libxml/functions/libxml-set-external-entity-loader.xml
+++ b/reference/libxml/functions/libxml-set-external-entity-loader.xml
@@ -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>
diff --git a/reference/sem/functions/shm-detach.xml b/reference/sem/functions/shm-detach.xml
index d24a748f4a9a..677cd1ddef58 100644
--- a/reference/sem/functions/shm-detach.xml
+++ b/reference/sem/functions/shm-detach.xml
@@ -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>