@@ -119,6 +119,15 @@ private function computeHash(): string
119
119
120
120
private function generateSignature (\ReflectionClass $ class ): iterable
121
121
{
122
+ if (\PHP_VERSION_ID >= 80000 ) {
123
+ $ attributes = [];
124
+ foreach ($ class ->getAttributes () as $ a ) {
125
+ $ attributes [] = [$ a ->getName (), $ a ->getArguments ()];
126
+ }
127
+ yield print_r ($ attributes , true );
128
+ $ attributes = [];
129
+ }
130
+
122
131
yield $ class ->getDocComment ();
123
132
yield (int ) $ class ->isFinal ();
124
133
yield (int ) $ class ->isAbstract ();
@@ -135,6 +144,14 @@ private function generateSignature(\ReflectionClass $class): iterable
135
144
$ defaults = $ class ->getDefaultProperties ();
136
145
137
146
foreach ($ class ->getProperties (\ReflectionProperty::IS_PUBLIC | \ReflectionProperty::IS_PROTECTED ) as $ p ) {
147
+ if (\PHP_VERSION_ID >= 80000 ) {
148
+ foreach ($ p ->getAttributes () as $ a ) {
149
+ $ attributes [] = [$ a ->getName (), $ a ->getArguments ()];
150
+ }
151
+ yield print_r ($ attributes , true );
152
+ $ attributes = [];
153
+ }
154
+
138
155
yield $ p ->getDocComment ();
139
156
yield $ p ->isDefault () ? '<default> ' : '' ;
140
157
yield $ p ->isPublic () ? 'public ' : 'protected ' ;
@@ -145,9 +162,25 @@ private function generateSignature(\ReflectionClass $class): iterable
145
162
}
146
163
147
164
foreach ($ class ->getMethods (\ReflectionMethod::IS_PUBLIC | \ReflectionMethod::IS_PROTECTED ) as $ m ) {
165
+ if (\PHP_VERSION_ID >= 80000 ) {
166
+ foreach ($ m ->getAttributes () as $ a ) {
167
+ $ attributes [] = [$ a ->getName (), $ a ->getArguments ()];
168
+ }
169
+ yield print_r ($ attributes , true );
170
+ $ attributes = [];
171
+ }
172
+
148
173
$ defaults = [];
149
174
$ parametersWithUndefinedConstants = [];
150
175
foreach ($ m ->getParameters () as $ p ) {
176
+ if (\PHP_VERSION_ID >= 80000 ) {
177
+ foreach ($ p ->getAttributes () as $ a ) {
178
+ $ attributes [] = [$ a ->getName (), $ a ->getArguments ()];
179
+ }
180
+ yield print_r ($ attributes , true );
181
+ $ attributes = [];
182
+ }
183
+
151
184
if (!$ p ->isDefaultValueAvailable ()) {
152
185
$ defaults [$ p ->name ] = null ;
153
186
0 commit comments