From dead2afb29f15909baf7befcaee78c6a880554f5 Mon Sep 17 00:00:00 2001 From: lcatoire Date: Fri, 10 Jul 2026 16:55:52 +0200 Subject: [PATCH 1/4] feat(reflection): ajoute la doc de ReflectionConstant::getAttributes() (PHP 8.5) --- .../reflectionconstant/getattributes.xml | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 reference/reflection/reflectionconstant/getattributes.xml diff --git a/reference/reflection/reflectionconstant/getattributes.xml b/reference/reflection/reflectionconstant/getattributes.xml new file mode 100644 index 000000000000..bb570a8e8893 --- /dev/null +++ b/reference/reflection/reflectionconstant/getattributes.xml @@ -0,0 +1,92 @@ + + + + + ReflectionConstant::getAttributes + Gets Attributes + + + + &reftitle.description; + + public arrayReflectionConstant::getAttributes + stringnullname&null; + intflags0 + + + Returns all attributes declared on this global constant as an array of ReflectionAttribute. + + + + + &reftitle.parameters; + + &reflection.getattributes.param.name; + &reflection.getattributes.param.flags; + + + + + &reftitle.returnvalues; + + Array of attributes, as ReflectionAttribute objects. + + + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 8.5.0 + + This method was introduced. + + + + + + + + + + &reftitle.seealso; + + + ReflectionClass::getAttributes + ReflectionClassConstant::getAttributes + ReflectionFunctionAbstract::getAttributes + ReflectionProperty::getAttributes + + + + + + From a09c86fdcc6d3a0e7e4b1af93e51b558a24a6e24 Mon Sep 17 00:00:00 2001 From: Louis-Arnaud Date: Fri, 10 Jul 2026 23:03:08 +0200 Subject: [PATCH 2/4] Apply DocBook style check: para->simpara, exceptionname, attribute order --- reference/reflection/reflectionconstant/getattributes.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reference/reflection/reflectionconstant/getattributes.xml b/reference/reflection/reflectionconstant/getattributes.xml index bb570a8e8893..fb90b045b78b 100644 --- a/reference/reflection/reflectionconstant/getattributes.xml +++ b/reference/reflection/reflectionconstant/getattributes.xml @@ -13,9 +13,9 @@ stringnullname&null; intflags0 - + Returns all attributes declared on this global constant as an array of ReflectionAttribute. - + @@ -28,9 +28,9 @@ &reftitle.returnvalues; - + Array of attributes, as ReflectionAttribute objects. - + From ce513a14d8a57bb834e969390f5b623761280e23 Mon Sep 17 00:00:00 2001 From: Louis-Arnaud Date: Thu, 16 Jul 2026 20:58:26 +0200 Subject: [PATCH 3/4] Unwrap simplelist from para in seealso --- .../reflectionconstant/getattributes.xml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/reference/reflection/reflectionconstant/getattributes.xml b/reference/reflection/reflectionconstant/getattributes.xml index fb90b045b78b..ca54f4232958 100644 --- a/reference/reflection/reflectionconstant/getattributes.xml +++ b/reference/reflection/reflectionconstant/getattributes.xml @@ -59,14 +59,12 @@ &reftitle.seealso; - - - ReflectionClass::getAttributes - ReflectionClassConstant::getAttributes - ReflectionFunctionAbstract::getAttributes - ReflectionProperty::getAttributes - - + + ReflectionClass::getAttributes + ReflectionClassConstant::getAttributes + ReflectionFunctionAbstract::getAttributes + ReflectionProperty::getAttributes + From c3ad7457365f76bfd643298126b664a753b99166 Mon Sep 17 00:00:00 2001 From: Louis-Arnaud Date: Thu, 16 Jul 2026 21:00:16 +0200 Subject: [PATCH 4/4] Add usage example to ReflectionConstant::getAttributes --- .../reflectionconstant/getattributes.xml | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/reference/reflection/reflectionconstant/getattributes.xml b/reference/reflection/reflectionconstant/getattributes.xml index ca54f4232958..9720e1cafa2b 100644 --- a/reference/reflection/reflectionconstant/getattributes.xml +++ b/reference/reflection/reflectionconstant/getattributes.xml @@ -57,6 +57,46 @@ + + &reftitle.examples; + + + Basic usage + +getAttributes(); +print_r(array_map(fn($attribute) => $attribute->getName(), $attributes)); +?> +]]> + + &example.outputs; + + Fruit + [1] => Red +) +]]> + + + + + &reftitle.seealso;