From 5b7646656eb183ea568b8261d6d87a10a1b961c7 Mon Sep 17 00:00:00 2001 From: Louis-Arnaud Date: Mon, 2 Mar 2026 22:55:02 +0100 Subject: [PATCH] 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. --- reference/array/functions/array-multisort.xml | 26 +++++++++++++++++-- reference/fileinfo/functions/finfo-close.xml | 10 +++++-- reference/ftp/functions/ftp-set-option.xml | 13 ++++++---- .../libxml-set-external-entity-loader.xml | 26 +++++++++++++++++-- reference/sem/functions/shm-detach.xml | 10 +++++-- 5 files changed, 72 insertions(+), 13 deletions(-) diff --git a/reference/array/functions/array-multisort.xml b/reference/array/functions/array-multisort.xml index e45e7cc51b..769e6629ab 100644 --- a/reference/array/functions/array-multisort.xml +++ b/reference/array/functions/array-multisort.xml @@ -8,7 +8,7 @@ &reftitle.description; - boolarray_multisort + truearray_multisort arrayarray1 mixedarray1_sort_orderSORT_ASC mixedarray1_sort_flagsSORT_REGULAR @@ -118,10 +118,32 @@ &reftitle.returnvalues; - &return.success; + &return.true.always; + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.5.0 + + The return type is &true; now; previously, it was bool. + + + + + + + &reftitle.examples; diff --git a/reference/fileinfo/functions/finfo-close.xml b/reference/fileinfo/functions/finfo-close.xml index ee6f5111ce..3a9ee23f3f 100644 --- a/reference/fileinfo/functions/finfo-close.xml +++ b/reference/fileinfo/functions/finfo-close.xml @@ -13,7 +13,7 @@ &reftitle.description; #[\Deprecated] - boolfinfo_close + truefinfo_close finfofinfo @@ -36,7 +36,7 @@ &reftitle.returnvalues; - &return.success; + &return.true.always; @@ -57,6 +57,12 @@ This function has been deprecated. + + 8.5.0 + + The return type is &true; now; previously, it was bool. + + 8.1.0 diff --git a/reference/ftp/functions/ftp-set-option.xml b/reference/ftp/functions/ftp-set-option.xml index 437aea2d8a..02086da15c 100644 --- a/reference/ftp/functions/ftp-set-option.xml +++ b/reference/ftp/functions/ftp-set-option.xml @@ -8,7 +8,7 @@ &reftitle.description; - boolftp_set_option + trueftp_set_option FTP\Connectionftp intoption intboolvalue @@ -81,10 +81,7 @@ &reftitle.returnvalues; - Returns &true; if the option could be set; &false; if not. A warning - message will be thrown if the option is not - supported or the passed value doesn't match the - expected value for the given option. + &return.true.always; @@ -99,6 +96,12 @@ + + 8.5.0 + + The return type is &true; now; previously, it was bool. + + &ftp.changelog.ftp-param; diff --git a/reference/libxml/functions/libxml-set-external-entity-loader.xml b/reference/libxml/functions/libxml-set-external-entity-loader.xml index 006c741bd7..fcff518c25 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 @@ &reftitle.description; - boollibxml_set_external_entity_loader + truelibxml_set_external_entity_loader callablenullresolver_function @@ -72,10 +72,32 @@ &reftitle.returnvalues; - &return.success; + &return.true.always; + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.5.0 + + The return type is &true; now; previously, it was bool. + + + + + + + &reftitle.examples; diff --git a/reference/sem/functions/shm-detach.xml b/reference/sem/functions/shm-detach.xml index d24a748f4a..677cd1ddef 100644 --- a/reference/sem/functions/shm-detach.xml +++ b/reference/sem/functions/shm-detach.xml @@ -9,7 +9,7 @@ &reftitle.description; - boolshm_detach + trueshm_detach SysvSharedMemoryshm @@ -37,7 +37,7 @@ &reftitle.returnvalues; - &return.success; + &return.true.always; @@ -52,6 +52,12 @@ + + 8.5.0 + + The return type is &true; now; previously, it was bool. + + 8.0.0