diff --git a/language/predefined/attributes.xml b/language/predefined/attributes.xml index 30d757915ecb..3ae9cd9b7afd 100644 --- a/language/predefined/attributes.xml +++ b/language/predefined/attributes.xml @@ -10,6 +10,7 @@ &language.predefined.attributes.attribute; &language.predefined.attributes.allowdynamicproperties; + &language.predefined.attributes.deprecated; &language.predefined.attributes.override; &language.predefined.attributes.returntypewillchange; &language.predefined.attributes.sensitiveparameter; diff --git a/language/predefined/attributes/deprecated.xml b/language/predefined/attributes/deprecated.xml new file mode 100644 index 000000000000..98763d59adc1 --- /dev/null +++ b/language/predefined/attributes/deprecated.xml @@ -0,0 +1,138 @@ + + + The Deprecated attribute + Deprecated + + + +
+ &reftitle.intro; + + This attribute is used to mark functionality as deprecated. + Using deprecated functionality will cause an E_USER_DEPRECATED error to be emitted. + +
+ +
+ &reftitle.classsynopsis; + + + + final + Deprecated + + + &Properties; + + public + readonly + stringnull + message + + + public + readonly + stringnull + since + + + &Methods; + + + + +
+ +
+ &reftitle.properties; + + + message + + + An optional message explaining the reason for the deprecation and possible replacement functionality. + Will be included in the emitted deprecation message. + + + + + since + + + An optional string indicating since when the functionality is deprecated. + The contents are not validated by PHP and may contain a version number, + a date or any other value that is considered appropriate. + Will be included in the emitted deprecation message. + + + Functionality that is part of PHP will use Major.Minor as the since value, + for example '8.4'. + + + + +
+ +
+ &reftitle.examples; + + + +]]> + + &example.outputs.84.similar; + + + + +
+ +
+ &reftitle.seealso; + + Attributes overview + ReflectionFunctionAbstract::isDeprecated + ReflectionClassConstant::isDeprecated + E_USER_DEPRECATED + +
+ +
+ + &language.predefined.attributes.deprecated.construct; + +
+ diff --git a/language/predefined/attributes/deprecated/construct.xml b/language/predefined/attributes/deprecated/construct.xml new file mode 100644 index 000000000000..0ac0114a2b23 --- /dev/null +++ b/language/predefined/attributes/deprecated/construct.xml @@ -0,0 +1,61 @@ + + + + Deprecated::__construct + Construct a new Deprecated attribute instance + + + + &reftitle.description; + + public Deprecated::__construct + stringnullmessage&null; + stringnullsince&null; + + + Constructs a new Deprecated instance. + + + + + &reftitle.parameters; + + + message + + + The value of the message property. + + + + + since + + + The value of the since property. + + + + + + + diff --git a/language/predefined/versions.xml b/language/predefined/versions.xml index 03c95b49b1ba..d79b0320fb76 100644 --- a/language/predefined/versions.xml +++ b/language/predefined/versions.xml @@ -177,6 +177,8 @@ + +