File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
tests/PHPStan/Rules/Properties Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,10 @@ protected function getRule(): Rule
2222 #[RequiresPhp('< 8.4 ' )]
2323 public function testPhp83AndPropertiesInInterface (): void
2424 {
25+ // @phpstan-ignore phpstan.skipTestsRequiresPhp
26+ if (PHP_VERSION_ID < 80000 ) {
27+ $ this ->markTestSkipped ('Property hooks cause syntax error on PHP 7.4 ' );
28+ }
2529 $ this ->analyse ([__DIR__ . '/data/properties-in-interface.php ' ], [
2630 [
2731 'Interfaces can include properties only on PHP 8.4 and later. ' ,
@@ -45,6 +49,10 @@ public function testPhp83AndPropertiesInInterface(): void
4549 #[RequiresPhp('< 8.4 ' )]
4650 public function testPhp83AndPropertyHooksInInterface (): void
4751 {
52+ // @phpstan-ignore phpstan.skipTestsRequiresPhp
53+ if (PHP_VERSION_ID < 80000 ) {
54+ $ this ->markTestSkipped ('Property hooks cause syntax error on PHP 7.4 ' );
55+ }
4856 $ this ->analyse ([__DIR__ . '/data/property-hooks-in-interface.php ' ], [
4957 [
5058 'Interfaces can include properties only on PHP 8.4 and later. ' ,
Original file line number Diff line number Diff line change @@ -33,6 +33,11 @@ public function testPhpLessThan84AndHookedPropertiesInClass(): void
3333 #[RequiresPhp('>= 8.4 ' )]
3434 public function testPhp84AndHookedPropertiesWithoutBodiesInClass (): void
3535 {
36+ // @phpstan-ignore phpstan.skipTestsRequiresPhp
37+ if (PHP_VERSION_ID < 80000 ) {
38+ $ this ->markTestSkipped ('Property hooks cause syntax error on PHP 7.4 ' );
39+ }
40+
3641 $ this ->analyse ([__DIR__ . '/data/hooked-properties-without-bodies-in-class.php ' ], [
3742 [
3843 'Non-abstract properties cannot include hooks without bodies. ' ,
You can’t perform that action at this time.
0 commit comments