You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,35 @@ This projects adheres to [Keep a CHANGELOG](https://keepachangelog.com/) and use
10
10
_Nothing yet._
11
11
12
12
13
+
## [1.2.0] - 2025-11-11
14
+
15
+
### Added
16
+
17
+
#### Utils
18
+
19
+
* New [`PHPCSUtils\Utils\AttributeBlock`][`AttributeBlock`] class: Utility functions to examine attribute blocks. [#720], [#729]
20
+
For the purposes of these utilities, an "attribute block" is defined as being an attribute opener, an attribute closer and everything between. I.e. `#[MyAttribute(1, 2), AnotherAttribute]` is one attribute block.
21
+
Initial set of available methods:
22
+
-`getAttributes()` to retrieve information about each attribute being instantiated within a particular attribute block.
23
+
-`countAttributes()` to retrieve a count of the number of attribute instantiations with a particular attribute block.
24
+
-`appliesTo()` to find the stack pointer to the language construct an attribute block applies to.
25
+
* New `PHPCSUtils\Utils\Constants::getAttributeOpeners()`, `PHPCSUtils\Utils\FunctionDeclarations::getAttributeOpeners()`, `PHPCSUtils\Utils\ObjectDeclarations::getAttributeOpeners()` and `PHPCSUtils\Utils\Variables::getAttributeOpeners()` utility methods. [#719]
26
+
These methods will each return an array with the stack pointers to the attribute openers for applicable attribute blocks.
27
+
This may be an empty array if no attributes apply to the constant/function/OO structure/property.
28
+
29
+
### Changed
30
+
31
+
#### Other
32
+
33
+
* Dropped support for [PHP_CodeSniffer] < 3.13.5/<4.00. [#729]
34
+
Please ensure you run `composer update phpcsstandards/phpcsutils --with-dependencies` to benefit from this.
0 commit comments