File tree Expand file tree Collapse file tree 3 files changed +5
-18
lines changed Expand file tree Collapse file tree 3 files changed +5
-18
lines changed Original file line number Diff line number Diff line change @@ -2096,16 +2096,13 @@ public function testBug3546(): void
2096
2096
$ this ->analyse ([__DIR__ . '/data/bug-3546.php ' ], []);
2097
2097
}
2098
2098
2099
+ #[RequiresPhp('>= 8.0 ' )]
2099
2100
public function testBug4800 (): void
2100
2101
{
2101
2102
$ this ->checkThisOnly = false ;
2102
2103
$ this ->checkNullables = true ;
2103
2104
$ this ->checkUnionTypes = true ;
2104
2105
2105
- if (PHP_VERSION_ID < 80000 ) {
2106
- $ this ->markTestSkipped ('Test requires PHP 8.0 ' );
2107
- }
2108
-
2109
2106
$ this ->analyse ([__DIR__ . '/data/bug-4800.php ' ], [
2110
2107
[
2111
2108
'Missing parameter $bar (string) in call to method Bug4800\HelloWorld2::a(). ' ,
Original file line number Diff line number Diff line change 15
15
use PHPUnit \Framework \Attributes \RequiresPhp ;
16
16
use function array_merge ;
17
17
use function usort ;
18
- use const PHP_VERSION_ID ;
19
18
20
19
/**
21
20
* @extends RuleTestCase<CallStaticMethodsRule>
@@ -412,14 +411,11 @@ public function testBug2164(): void
412
411
]);
413
412
}
414
413
414
+ #[RequiresPhp('>= 8.0 ' )]
415
415
public function testNamedArguments (): void
416
416
{
417
417
$ this ->checkThisOnly = false ;
418
418
419
- if (PHP_VERSION_ID < 80000 ) {
420
- $ this ->markTestSkipped ('Test requires PHP 8.0 ' );
421
- }
422
-
423
419
$ this ->analyse ([__DIR__ . '/data/static-method-named-arguments.php ' ], [
424
420
[
425
421
'Missing parameter $j (int) in call to static method StaticMethodNamedArguments\Foo::doFoo(). ' ,
Original file line number Diff line number Diff line change 6
6
use PHPStan \Reflection \PropertyReflection ;
7
7
use PHPStan \Rules \Rule ;
8
8
use PHPStan \Testing \RuleTestCase ;
9
+ use PHPUnit \Framework \Attributes \RequiresPhp ;
9
10
use function strpos ;
10
- use const PHP_VERSION_ID ;
11
11
12
12
/**
13
13
* @extends RuleTestCase<UninitializedPropertyRule>
@@ -217,21 +217,15 @@ public function testRedeclareReadonlyProperties(): void
217
217
]);
218
218
}
219
219
220
+ #[RequiresPhp('>= 8.4 ' )]
220
221
public function testBug12336 (): void
221
222
{
222
- if (PHP_VERSION_ID < 80400 ) {
223
- $ this ->markTestSkipped ('Test requires PHP 8.4. ' );
224
- }
225
-
226
223
$ this ->analyse ([__DIR__ . '/data/bug-12336.php ' ], []);
227
224
}
228
225
226
+ #[RequiresPhp('>= 8.4 ' )]
229
227
public function testBug12547 (): void
230
228
{
231
- if (PHP_VERSION_ID < 80400 ) {
232
- $ this ->markTestSkipped ('Test requires PHP 8.4. ' );
233
- }
234
-
235
229
$ this ->analyse ([__DIR__ . '/data/bug-12547.php ' ], []);
236
230
}
237
231
You can’t perform that action at this time.
0 commit comments