From 05fbc86558413a63e1e5406fe8f440aef38d4df1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Pudil?= Date: Tue, 12 Aug 2025 15:57:17 +0200 Subject: [PATCH] Override: document usage with properties (PHP 8.5) --- language/predefined/attributes/override.xml | 60 ++++++++++++++++++--- 1 file changed, 54 insertions(+), 6 deletions(-) diff --git a/language/predefined/attributes/override.xml b/language/predefined/attributes/override.xml index 30c0a5f4400b..4562aee261e2 100644 --- a/language/predefined/attributes/override.xml +++ b/language/predefined/attributes/override.xml @@ -8,12 +8,12 @@
&reftitle.intro; - This attribute is used to indicate that a method is intended - to override a method of a parent class or that it implements - a method defined in an interface. + This attribute is used to indicate that a method or a property is intended + to override a method or a property of a parent class or that it implements + a method or a property defined in an interface. - If no method with the same name exists in a parent class or + If no method or property with the same name exists in a parent class or in an implemented interface a compile-time error will be emitted. @@ -41,9 +41,32 @@
+
+ &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.5.0 + + Override can be applied to properties. + + + + + +
+
&reftitle.examples; - + + Usage with methods - + + + Usage with properties + + +]]> + + &example.outputs.85.similar; + + + +