Skip to content

Commit 196beae

Browse files
committed
Fix
1 parent 00e7f8f commit 196beae

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/Rules/Doctrine/ORM/EntityMappingExceptionRuleTest.php

+7
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use PHPStan\Rules\Rule;
66
use PHPStan\Testing\RuleTestCase;
77
use PHPStan\Type\Doctrine\ObjectMetadataResolver;
8+
use const PHP_VERSION_ID;
89

910
/**
1011
* @extends RuleTestCase<EntityMappingExceptionRule>
@@ -21,11 +22,17 @@ protected function getRule(): Rule
2122

2223
public function testValidEntity(): void
2324
{
25+
if (PHP_VERSION_ID < 80100) {
26+
self::markTestSkipped('Test requires PHP 8.1.');
27+
}
2428
$this->analyse([__DIR__ . '/data-attributes/enum-type.php'], []);
2529
}
2630

2731
public function testInvalidEntity(): void
2832
{
33+
if (PHP_VERSION_ID < 80100) {
34+
self::markTestSkipped('Test requires PHP 8.1.');
35+
}
2936
$this->analyse([__DIR__ . '/data-attributes/enum-type-without-pk.php'], [
3037
[
3138
'No identifier/primary key specified for Entity "PHPStan\Rules\Doctrine\ORMAttributes\FooWithoutPK". Every Entity must have an identifier/primary key.',

0 commit comments

Comments
 (0)