Skip to content

Commit a481ec6

Browse files
committed
Fix
1 parent a16c7ae commit a481ec6

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

build/enums.neon

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
parameters:
2+
excludePaths:
3+
- ../tests/PHPStan/Fixture/TestEnum.php

build/ignore-by-php-version.neon.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
}
1616
if (PHP_VERSION_ID >= 80100) {
1717
$config = array_merge_recursive($config, $adapter->load(__DIR__ . '/baseline-8.1.neon'));
18+
} else {
19+
$config = array_merge_recursive($config, $adapter->load(__DIR__ . '/enums.neon'));
1820
}
1921

2022
if (PHP_VERSION_ID >= 70400) {

tests/PHPStan/Reflection/ClassReflectionTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
use NestedTraits\BazTrait;
2929
use NestedTraits\NoTrait;
3030
use PHPStan\Broker\Broker;
31-
use PHPStan\Fixture\TestEnum;
3231
use PHPStan\Php\PhpVersion;
3332
use PHPStan\PhpDoc\PhpDocInheritanceResolver;
3433
use PHPStan\PhpDoc\StubPhpDocProvider;
@@ -333,9 +332,9 @@ public function testEnumIsFinal(): void
333332
}
334333

335334
$reflectionProvider = $this->createReflectionProvider();
336-
$enum = $reflectionProvider->getClass(TestEnum::class);
335+
$enum = $reflectionProvider->getClass('PHPStan\Fixture\TestEnum');
337336
$this->assertTrue($enum->isEnum());
338-
$this->assertInstanceOf(ReflectionEnum::class, $enum->getNativeReflection());
337+
$this->assertInstanceOf('ReflectionEnum', $enum->getNativeReflection());
339338
$this->assertTrue($enum->isFinal());
340339
$this->assertTrue($enum->isFinalByKeyword());
341340
}

0 commit comments

Comments
 (0)