@@ -121,6 +121,15 @@ private function computeHash(): string
121121
122122 private function generateSignature (\ReflectionClass $ class ): iterable
123123 {
124+ if (\PHP_VERSION_ID >= 80000 ) {
125+ $ attributes = [];
126+ foreach ($ class ->getAttributes () as $ a ) {
127+ $ attributes [] = [$ a ->getName (), $ a ->getArguments ()];
128+ }
129+ yield print_r ($ attributes , true );
130+ $ attributes = [];
131+ }
132+
124133 yield $ class ->getDocComment ();
125134 yield (int ) $ class ->isFinal ();
126135 yield (int ) $ class ->isAbstract ();
@@ -137,6 +146,14 @@ private function generateSignature(\ReflectionClass $class): iterable
137146 $ defaults = $ class ->getDefaultProperties ();
138147
139148 foreach ($ class ->getProperties (\ReflectionProperty::IS_PUBLIC | \ReflectionProperty::IS_PROTECTED ) as $ p ) {
149+ if (\PHP_VERSION_ID >= 80000 ) {
150+ foreach ($ p ->getAttributes () as $ a ) {
151+ $ attributes [] = [$ a ->getName (), $ a ->getArguments ()];
152+ }
153+ yield print_r ($ attributes , true );
154+ $ attributes = [];
155+ }
156+
140157 yield $ p ->getDocComment ();
141158 yield $ p ->isDefault () ? '<default> ' : '' ;
142159 yield $ p ->isPublic () ? 'public ' : 'protected ' ;
@@ -147,9 +164,25 @@ private function generateSignature(\ReflectionClass $class): iterable
147164 }
148165
149166 foreach ($ class ->getMethods (\ReflectionMethod::IS_PUBLIC | \ReflectionMethod::IS_PROTECTED ) as $ m ) {
167+ if (\PHP_VERSION_ID >= 80000 ) {
168+ foreach ($ m ->getAttributes () as $ a ) {
169+ $ attributes [] = [$ a ->getName (), $ a ->getArguments ()];
170+ }
171+ yield print_r ($ attributes , true );
172+ $ attributes = [];
173+ }
174+
150175 $ defaults = [];
151176 $ parametersWithUndefinedConstants = [];
152177 foreach ($ m ->getParameters () as $ p ) {
178+ if (\PHP_VERSION_ID >= 80000 ) {
179+ foreach ($ p ->getAttributes () as $ a ) {
180+ $ attributes [] = [$ a ->getName (), $ a ->getArguments ()];
181+ }
182+ yield print_r ($ attributes , true );
183+ $ attributes = [];
184+ }
185+
153186 if (!$ p ->isDefaultValueAvailable ()) {
154187 $ defaults [$ p ->name ] = null ;
155188
0 commit comments