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
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 @@ -22,6 +22,11 @@ protected function getRule(): Rule
2222 #[RequiresPhp('< 8.4 ' )]
2323 public function testPhpLessThan84AndHookedPropertiesInClass (): 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+ }
29+
2530 $ this ->analyse ([__DIR__ . '/data/hooked-properties-in-class.php ' ], [
2631 [
2732 'Property hooks are supported only on PHP 8.4 and later. ' ,
@@ -33,6 +38,11 @@ public function testPhpLessThan84AndHookedPropertiesInClass(): void
3338 #[RequiresPhp('>= 8.4 ' )]
3439 public function testPhp84AndHookedPropertiesWithoutBodiesInClass (): void
3540 {
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+
3646 $ this ->analyse ([__DIR__ . '/data/hooked-properties-without-bodies-in-class.php ' ], [
3747 [
3848 'Non-abstract properties cannot include hooks without bodies. ' ,
You can’t perform that action at this time.
0 commit comments