From 93cc19efef135794877bc9013f7f891b459f4989 Mon Sep 17 00:00:00 2001 From: Eric Stern Date: Thu, 2 Dec 2021 14:01:16 -0800 Subject: [PATCH] Add list of attribute target constants I think the constant names are self-explanatory enough to not require additional information Closes GH-1168. --- language/attributes.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/language/attributes.xml b/language/attributes.xml index 7572075bee..0ad692372d 100644 --- a/language/attributes.xml +++ b/language/attributes.xml @@ -333,6 +333,18 @@ class MyAttribute + The following targets can be specified: + + + Attribute::TARGET_CLASS + Attribute::TARGET_FUNCTION + Attribute::TARGET_METHOD + Attribute::TARGET_PROPERTY + Attribute::TARGET_CLASS_CONSTANT + Attribute::TARGET_PARAMETER + Attribute::TARGET_ALL + + By default an attribute can only be used once per declaration. If the attribute should be repeatable on declarations it must be specified as part of the bitmask to the #[Attribute] declaration.