rfc:attribute_amendments
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:attribute_amendments [2020/05/20 17:15] – beberlei | rfc:attribute_amendments [2020/06/04 09:11] – beberlei | ||
---|---|---|---|
Line 12: | Line 12: | ||
===== Rename PhpAttribute class to Attribute ===== | ===== Rename PhpAttribute class to Attribute ===== | ||
+ | |||
+ | < | ||
The original RFC introduced a // | The original RFC introduced a // | ||
userland attributes. This name was inspired by // | userland attributes. This name was inspired by // | ||
avoid breaking existing userland codebases with a class called // | avoid breaking existing userland codebases with a class called // | ||
- | However the //Php// prefix | + | However the //Php// prefix makes no sense for the attribute class compared to // |
In absence of a namespace policy, the global namespace is PHPs namespace. The | In absence of a namespace policy, the global namespace is PHPs namespace. The | ||
- | documentation states as much. | + | documentation states as much and the vote on https:// |
- | We propose to rename // | + | Therefore we propose to rename // |
+ | recommend that all internal/ | ||
- | This will cause problems with applications | + | Extensions providing non-core attributes should consider |
- | + | ||
- | Should [[https:// | + | |
===== Group statement for Attributes ===== | ===== Group statement for Attributes ===== | ||
Line 56: | Line 57: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | In line with many other recent RFCs, trailing commas will also be possible in an attribute group declarations: | ||
+ | |||
+ | <code php> | ||
+ | << | ||
+ | Attr1(" | ||
+ | Attr2(" | ||
+ | >> | ||
+ | public function test() | ||
+ | { | ||
+ | } | ||
+ | </ | ||
+ | |||
===== Validate Attribute Target Declarations ===== | ===== Validate Attribute Target Declarations ===== | ||
Line 171: | Line 185: | ||
===== Backward Incompatible Changes ===== | ===== Backward Incompatible Changes ===== | ||
- | No breaks. | + | Introducing a class // |
===== Proposed PHP Version(s) ===== | ===== Proposed PHP Version(s) ===== |
rfc/attribute_amendments.txt · Last modified: 2020/06/29 09:07 by beberlei