File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
tests/PHPStan/Rules/Properties Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,10 @@ protected function getRule(): Rule
22
22
#[RequiresPhp('< 8.4 ' )]
23
23
public function testPhp83AndPropertiesInInterface (): void
24
24
{
25
+ // @phpstan-ignore phpstan.skipTestsRequiresPhp
26
+ if (PHP_VERSION_ID < 80000 ) {
27
+ $ this ->markTestSkipped ('Property hooks cause syntax error on PHP 7.4 ' );
28
+ }
25
29
$ this ->analyse ([__DIR__ . '/data/properties-in-interface.php ' ], [
26
30
[
27
31
'Interfaces can include properties only on PHP 8.4 and later. ' ,
@@ -45,6 +49,10 @@ public function testPhp83AndPropertiesInInterface(): void
45
49
#[RequiresPhp('< 8.4 ' )]
46
50
public function testPhp83AndPropertyHooksInInterface (): void
47
51
{
52
+ // @phpstan-ignore phpstan.skipTestsRequiresPhp
53
+ if (PHP_VERSION_ID < 80000 ) {
54
+ $ this ->markTestSkipped ('Property hooks cause syntax error on PHP 7.4 ' );
55
+ }
48
56
$ this ->analyse ([__DIR__ . '/data/property-hooks-in-interface.php ' ], [
49
57
[
50
58
'Interfaces can include properties only on PHP 8.4 and later. ' ,
Original file line number Diff line number Diff line change @@ -22,6 +22,11 @@ protected function getRule(): Rule
22
22
#[RequiresPhp('< 8.4 ' )]
23
23
public function testPhpLessThan84AndHookedPropertiesInClass (): void
24
24
{
25
+ // @phpstan-ignore phpstan.skipTestsRequiresPhp
26
+ if (PHP_VERSION_ID < 80000 ) {
27
+ $ this ->markTestSkipped ('Property hooks cause syntax error on PHP 7.4 ' );
28
+ }
29
+
25
30
$ this ->analyse ([__DIR__ . '/data/hooked-properties-in-class.php ' ], [
26
31
[
27
32
'Property hooks are supported only on PHP 8.4 and later. ' ,
@@ -33,6 +38,11 @@ public function testPhpLessThan84AndHookedPropertiesInClass(): void
33
38
#[RequiresPhp('>= 8.4 ' )]
34
39
public function testPhp84AndHookedPropertiesWithoutBodiesInClass (): void
35
40
{
41
+ // @phpstan-ignore phpstan.skipTestsRequiresPhp
42
+ if (PHP_VERSION_ID < 80000 ) {
43
+ $ this ->markTestSkipped ('Property hooks cause syntax error on PHP 7.4 ' );
44
+ }
45
+
36
46
$ this ->analyse ([__DIR__ . '/data/hooked-properties-without-bodies-in-class.php ' ], [
37
47
[
38
48
'Non-abstract properties cannot include hooks without bodies. ' ,
You can’t perform that action at this time.
0 commit comments