From f7713b22d571b7078544974b5fa4ee4bcdf1122b Mon Sep 17 00:00:00 2001 From: Emre ULUSOY Date: Wed, 9 Jul 2025 22:04:26 +0200 Subject: [PATCH] Document boolean support for allowed_classes in unserialize - In appendices/migration84/incompatible.xml, update the description of the allowed_classes option to indicate it may be an array of class names or at boolean. - In reference/var/functions/unserialize.xml, clarify that unserialize() throws TypeError and ValueError if options.allowed_classes is not an array or boolean. --- appendices/migration84/incompatible.xml | 6 +++--- reference/var/functions/unserialize.xml | 13 +++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/appendices/migration84/incompatible.xml b/appendices/migration84/incompatible.xml index 44ccfe2b4334..03e8cc691a60 100644 --- a/appendices/migration84/incompatible.xml +++ b/appendices/migration84/incompatible.xml @@ -409,9 +409,9 @@ The "allowed_classes" option for unserialize now throws - TypeErrors and - ValueErrors if it is not an - array of class names. + TypeError and + ValueError if it is neither an + array of class names nor a boolean. diff --git a/reference/var/functions/unserialize.xml b/reference/var/functions/unserialize.xml index 7dfee0a6968a..7c75b6c20857 100644 --- a/reference/var/functions/unserialize.xml +++ b/reference/var/functions/unserialize.xml @@ -146,9 +146,9 @@ As of PHP 8.4.0, if the allowed_classes element of - options is not an array of class names, - unserialize throws TypeErrors - and ValueErrors. + options is neither a array of class names + nor a boolean, unserialize throws + TypeError and ValueError. @@ -167,9 +167,10 @@ 8.4.0 - Now throws TypeErrors and - ValueErrors if the allowed_classes - element of options is not an array of class names. + Now throws TypeError and + ValueError if the allowed_classes + element of options is neither a array of class names + nor a boolean.