From 51847c2230871307fe7e32efaf4571d296363d6a Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Sat, 17 Feb 2024 11:16:46 +0300 Subject: [PATCH 1/2] [PHP 8.3] Update `get_class` and `get_parent_class` --- reference/classobj/functions/get-class.xml | 13 ++++++++----- reference/classobj/functions/get-parent-class.xml | 13 ++++++++----- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/reference/classobj/functions/get-class.xml b/reference/classobj/functions/get-class.xml index ab2a6c81f2bc..57b4c126e2e9 100644 --- a/reference/classobj/functions/get-class.xml +++ b/reference/classobj/functions/get-class.xml @@ -23,7 +23,7 @@ object - The tested object. This parameter may be omitted when inside a class. + The tested object. @@ -44,10 +44,6 @@ Returns the name of the class of which object is an instance. - - If object is omitted when inside a class, the - name of that class is returned. - If the object is an instance of a class which exists in a namespace, the qualified namespaced name of that class is returned. @@ -78,6 +74,13 @@ + + 8.3.0 + + Now call without an argument emits an E_DEPRECATED warning; + previously, calling this function inside a class returned the name of that class. + + 8.0.0 diff --git a/reference/classobj/functions/get-parent-class.xml b/reference/classobj/functions/get-parent-class.xml index 4a9a265bdbd1..f3fa355406e6 100644 --- a/reference/classobj/functions/get-parent-class.xml +++ b/reference/classobj/functions/get-parent-class.xml @@ -23,8 +23,7 @@ object_or_class - The tested object or class name. This parameter is optional if called - from the object's method. + The tested object or class name. @@ -41,9 +40,6 @@ If the object does not have a parent or the given class does not exist, &false; will be returned. - - If called without parameter outside object, this function returns &false;. - @@ -57,6 +53,13 @@ + + 8.3.0 + + Now call without an argument emits an E_DEPRECATED warning; + previously, calling this function inside a class returned the parent class name of that class. + + 8.0.0 From 030cf94292285ded6dffa9765adb1a1256ca5410 Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Sun, 18 Feb 2024 23:07:31 +0300 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Gina Peter Banyard --- reference/classobj/functions/get-class.xml | 3 ++- reference/classobj/functions/get-parent-class.xml | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/reference/classobj/functions/get-class.xml b/reference/classobj/functions/get-class.xml index 57b4c126e2e9..affeee8085c4 100644 --- a/reference/classobj/functions/get-class.xml +++ b/reference/classobj/functions/get-class.xml @@ -77,7 +77,8 @@ 8.3.0 - Now call without an argument emits an E_DEPRECATED warning; + Calling get_class without an argument now emits an + E_DEPRECATED warning; previously, calling this function inside a class returned the name of that class. diff --git a/reference/classobj/functions/get-parent-class.xml b/reference/classobj/functions/get-parent-class.xml index f3fa355406e6..f15a0fb37708 100644 --- a/reference/classobj/functions/get-parent-class.xml +++ b/reference/classobj/functions/get-parent-class.xml @@ -56,8 +56,9 @@ 8.3.0 - Now call without an argument emits an E_DEPRECATED warning; - previously, calling this function inside a class returned the parent class name of that class. + Calling get_class without an argument now emits an + E_DEPRECATED warning; + previously, calling this function inside a class returned the name of that class.