From 790f63af6521908477b285ff753e454e118bb989 Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Tue, 12 Nov 2024 14:36:24 +0000 Subject: [PATCH] PHP 8.4: Document reflection changes (#4037) --- reference/reflection/reflectionattribute.xml | 43 +++++++++ .../reflection/reflectionmethod/construct.xml | 7 ++ reference/reflection/reflectionproperty.xml | 89 +++++++++++++++++++ .../reflection/reflectionproperty/islazy.xml | 2 +- .../setrawvaluewithoutlazyinitialization.xml | 2 +- 5 files changed, 141 insertions(+), 2 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/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..73c8ceef43c5 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.4.0. + + + + @@ -199,6 +278,16 @@ + + 8.4.0 + + Added ReflectionProperty::IS_VIRTUAL, + ReflectionProperty::IS_PRIVATE_SET, + ReflectionProperty::IS_PROTECTED_SET, + ReflectionProperty::IS_ABSTRACT, + and 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