File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 66use PHPStan \Testing \PHPStanTestCase ;
77use ReflectionClass ;
88use function realpath ;
9+ use const PHP_VERSION_ID ;
910
1011class TestsUsageExcluderTest extends PHPStanTestCase
1112{
@@ -16,7 +17,9 @@ public function testAutodetectComposerDevPaths(): void
1617
1718 $ excluderReflection = new ReflectionClass (TestsUsageExcluder::class);
1819 $ devPathsPropertyReflection = $ excluderReflection ->getProperty ('devPaths ' );
19- $ devPathsPropertyReflection ->setAccessible (true );
20+ if (PHP_VERSION_ID < 8_01_00 ) {
21+ $ devPathsPropertyReflection ->setAccessible (true );
22+ }
2023
2124 self ::assertSame ([
2225 realpath (__DIR__ . '/../../tests ' ),
Original file line number Diff line number Diff line change 77use function mkdir ;
88use function realpath ;
99use function rmdir ;
10+ use const PHP_VERSION_ID ;
1011
1112class SymfonyUsageProviderTest extends PHPStanTestCase
1213{
@@ -20,7 +21,9 @@ public function testAutodetectConfigDir(): void
2021
2122 $ providerReflection = new ReflectionClass (SymfonyUsageProvider::class);
2223 $ configDirPropertyReflection = $ providerReflection ->getProperty ('configDir ' );
23- $ configDirPropertyReflection ->setAccessible (true );
24+ if (PHP_VERSION_ID < 8_01_00 ) {
25+ $ configDirPropertyReflection ->setAccessible (true );
26+ }
2427
2528 $ configDirFromProperty = $ configDirPropertyReflection ->getValue ($ provider );
2629
You can’t perform that action at this time.
0 commit comments