From 12e82b257e2cce3418e5f886ab682422cb5f9485 Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Mon, 11 Nov 2024 14:02:36 +0000 Subject: [PATCH 1/3] PHP 8.4: Document reflection changes Drive-by fix for 8.1 ommision --- reference/reflection/reflectionattribute.xml | 43 +++++++++ .../reflectionclass/resetaslazyghost.xml | 4 +- .../reflection/reflectionmethod/construct.xml | 7 ++ reference/reflection/reflectionproperty.xml | 94 +++++++++++++++++++ .../reflection/reflectionproperty/islazy.xml | 2 +- .../setrawvaluewithoutlazyinitialization.xml | 2 +- 6 files changed, 148 insertions(+), 4 deletions(-) diff --git a/reference/reflection/reflectionattribute.xml b/reference/reflection/reflectionattribute.xml index bfe5432ab93f..f9b9f4dad64c 100644 --- a/reference/reflection/reflectionattribute.xml +++ b/reference/reflection/reflectionattribute.xml @@ -39,6 +39,13 @@ ReflectionAttribute::IS_INSTANCEOF + &Properties; + + public + string + name + + &Methods; @@ -51,6 +58,20 @@ +
+ &reftitle.properties; + + + name + + + The name of the attribute. + + + + +
+
&reftitle.constants; @@ -80,6 +101,28 @@
+
+ &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.4.0 + + Added ReflectionAttribute::$name. + + + + + +
+ &reference.reflection.entities.reflectionattribute; diff --git a/reference/reflection/reflectionclass/resetaslazyghost.xml b/reference/reflection/reflectionclass/resetaslazyghost.xml index 1202bc9b272a..f91264185ad3 100644 --- a/reference/reflection/reflectionclass/resetaslazyghost.xml +++ b/reference/reflection/reflectionclass/resetaslazyghost.xml @@ -10,7 +10,7 @@ public voidReflectionClass::resetAsLazyGhost objectobject - callableinitializer + callablefactory intoptions0 @@ -69,7 +69,7 @@ - initializer + factory An initializer callback with the same signature and purpose as in diff --git a/reference/reflection/reflectionmethod/construct.xml b/reference/reflection/reflectionmethod/construct.xml index 77ecbc2c353f..23ba43556a88 100644 --- a/reference/reflection/reflectionmethod/construct.xml +++ b/reference/reflection/reflectionmethod/construct.xml @@ -18,6 +18,13 @@ public ReflectionMethod::__construct stringclassMethod + + + The alternative signature is deprecated as of PHP 8.4.0, + use ReflectionMethod::createFromMethodName + instead. + + Constructs a new ReflectionMethod. diff --git a/reference/reflection/reflectionproperty.xml b/reference/reflection/reflectionproperty.xml index 4a9605c32f3b..522b38e25747 100644 --- a/reference/reflection/reflectionproperty.xml +++ b/reference/reflection/reflectionproperty.xml @@ -62,6 +62,36 @@ int ReflectionProperty::IS_PRIVATE + + public + const + int + ReflectionProperty::IS_ABSTRACT + + + public + const + int + ReflectionProperty::IS_PROTECTED_SET + + + public + const + int + ReflectionProperty::IS_PRIVATE_SET + + + public + const + int + ReflectionProperty::IS_VIRTUAL + + + public + const + int + ReflectionProperty::IS_FINAL + &Properties; @@ -176,6 +206,55 @@ + + ReflectionProperty::IS_ABSTRACT + + + Indicates the property is + abstract. + Available as of PHP 8.4.0. + + + + + + ReflectionProperty::IS_PROTECTED_SET + + + Available as of PHP 8.4.0. + + + + + + ReflectionProperty::IS_PRIVATE_SET + + + Available as of PHP 8.4.0. + + + + + + ReflectionProperty::IS_VIRTUAL + + + Available as of PHP 8.4.0. + + + + + + ReflectionProperty::IS_FINAL + + + Indicates the property is + final. + Available as of PHP 8.1.0. + + + + @@ -199,6 +278,21 @@ + + 8.4.0 + + Added ReflectionProperty::IS_VIRTUAL, + ReflectionProperty::IS_PRIVATE_SET, + ReflectionProperty::IS_PROTECTED_SET, + ReflectionProperty::IS_ABSTRACT. + + + + 8.1.0 + + Added ReflectionProperty::IS_FINAL. + + 8.0.0 diff --git a/reference/reflection/reflectionproperty/islazy.xml b/reference/reflection/reflectionproperty/islazy.xml index 9bd233e056db..d177e9f83eb2 100644 --- a/reference/reflection/reflectionproperty/islazy.xml +++ b/reference/reflection/reflectionproperty/islazy.xml @@ -7,7 +7,7 @@ &reftitle.description; - + public boolReflectionProperty::isLazy objectobject diff --git a/reference/reflection/reflectionproperty/setrawvaluewithoutlazyinitialization.xml b/reference/reflection/reflectionproperty/setrawvaluewithoutlazyinitialization.xml index da0841125007..176825d34e45 100644 --- a/reference/reflection/reflectionproperty/setrawvaluewithoutlazyinitialization.xml +++ b/reference/reflection/reflectionproperty/setrawvaluewithoutlazyinitialization.xml @@ -10,7 +10,7 @@ public voidReflectionProperty::setRawValueWithoutLazyInitialization objectobject - mixednullvalue + mixedvalue Sets (changes) the property's value without triggering lazy initialization From 83d18a165166eda6a6818d34967f400cb7c250a5 Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Tue, 12 Nov 2024 14:32:50 +0000 Subject: [PATCH 2/3] revert ReflectionClass::resetAsLazyGhost param name change This is being fixed in php-src --- reference/reflection/reflectionclass/resetaslazyghost.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/reflection/reflectionclass/resetaslazyghost.xml b/reference/reflection/reflectionclass/resetaslazyghost.xml index f91264185ad3..1202bc9b272a 100644 --- a/reference/reflection/reflectionclass/resetaslazyghost.xml +++ b/reference/reflection/reflectionclass/resetaslazyghost.xml @@ -10,7 +10,7 @@ public voidReflectionClass::resetAsLazyGhost objectobject - callablefactory + callableinitializer intoptions0 @@ -69,7 +69,7 @@ - factory + initializer An initializer callback with the same signature and purpose as in From cf68819a55900dccdc301a35e74d8990363f71af Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Tue, 12 Nov 2024 14:35:23 +0000 Subject: [PATCH 3/3] Fix IS_FINAL for property is available as of 8.4.0 --- reference/reflection/reflectionproperty.xml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/reference/reflection/reflectionproperty.xml b/reference/reflection/reflectionproperty.xml index 522b38e25747..73c8ceef43c5 100644 --- a/reference/reflection/reflectionproperty.xml +++ b/reference/reflection/reflectionproperty.xml @@ -250,7 +250,7 @@ Indicates the property is final. - Available as of PHP 8.1.0. + Available as of PHP 8.4.0. @@ -284,13 +284,8 @@ Added ReflectionProperty::IS_VIRTUAL, ReflectionProperty::IS_PRIVATE_SET, ReflectionProperty::IS_PROTECTED_SET, - ReflectionProperty::IS_ABSTRACT. - - - - 8.1.0 - - Added ReflectionProperty::IS_FINAL. + ReflectionProperty::IS_ABSTRACT, + and ReflectionProperty::IS_FINAL.