@@ -300,12 +300,16 @@ public function testGetFunctionArgumentsWithVariadicParameters(): void
300300
301301 $ reflectionClass = new \ReflectionClass ($ frameBuilder );
302302 $ getFunctionArgumentsMethod = $ reflectionClass ->getMethod ('getFunctionArguments ' );
303- $ getFunctionArgumentsMethod ->setAccessible (true );
303+ if (\PHP_VERSION_ID < 80100 ) {
304+ $ getFunctionArgumentsMethod ->setAccessible (true );
305+ }
304306
305307 $ reflectionFunction = new \ReflectionFunction ($ testFunction );
306308
307309 $ getFunctionArgumentValuesMethod = $ reflectionClass ->getMethod ('getFunctionArgumentValues ' );
308- $ getFunctionArgumentValuesMethod ->setAccessible (true );
310+ if (\PHP_VERSION_ID < 80100 ) {
311+ $ getFunctionArgumentValuesMethod ->setAccessible (true );
312+ }
309313
310314 $ result = $ getFunctionArgumentValuesMethod ->invoke ($ frameBuilder , $ reflectionFunction , $ backtraceFrame ['args ' ]);
311315
@@ -331,7 +335,9 @@ public function testGetFunctionArgumentsWithOnlyVariadicParameters(): void
331335
332336 $ reflectionClass = new \ReflectionClass ($ frameBuilder );
333337 $ getFunctionArgumentValuesMethod = $ reflectionClass ->getMethod ('getFunctionArgumentValues ' );
334- $ getFunctionArgumentValuesMethod ->setAccessible (true );
338+ if (\PHP_VERSION_ID < 80100 ) {
339+ $ getFunctionArgumentValuesMethod ->setAccessible (true );
340+ }
335341
336342 $ reflectionFunction = new \ReflectionFunction ($ testFunction );
337343
@@ -356,7 +362,9 @@ public function testGetFunctionArgumentsWithEmptyVariadicParameters(): void
356362
357363 $ reflectionClass = new \ReflectionClass ($ frameBuilder );
358364 $ getFunctionArgumentValuesMethod = $ reflectionClass ->getMethod ('getFunctionArgumentValues ' );
359- $ getFunctionArgumentValuesMethod ->setAccessible (true );
365+ if (\PHP_VERSION_ID < 80100 ) {
366+ $ getFunctionArgumentValuesMethod ->setAccessible (true );
367+ }
360368
361369 $ reflectionFunction = new \ReflectionFunction ($ testFunction );
362370
@@ -383,7 +391,9 @@ public function testGetFunctionArgumentsWithNullValues(): void
383391
384392 $ reflectionClass = new \ReflectionClass ($ frameBuilder );
385393 $ getFunctionArgumentValuesMethod = $ reflectionClass ->getMethod ('getFunctionArgumentValues ' );
386- $ getFunctionArgumentValuesMethod ->setAccessible (true );
394+ if (\PHP_VERSION_ID < 80100 ) {
395+ $ getFunctionArgumentValuesMethod ->setAccessible (true );
396+ }
387397
388398 $ reflectionFunction = new \ReflectionFunction ($ testFunction );
389399
@@ -418,7 +428,9 @@ public function testGetFunctionArgumentsWithGapsInBacktraceArrayIndices(): void
418428
419429 $ reflectionClass = new \ReflectionClass ($ frameBuilder );
420430 $ getFunctionArgumentValuesMethod = $ reflectionClass ->getMethod ('getFunctionArgumentValues ' );
421- $ getFunctionArgumentValuesMethod ->setAccessible (true );
431+ if (\PHP_VERSION_ID < 80100 ) {
432+ $ getFunctionArgumentValuesMethod ->setAccessible (true );
433+ }
422434
423435 $ reflectionFunction = new \ReflectionFunction ($ testFunction );
424436
0 commit comments