Skip to content

Commit 02fab88

Browse files
committed
Skip mixed tests on PHP < 8.0
1 parent 069d6e9 commit 02fab88

File tree

58 files changed

+181
-37
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+181
-37
lines changed

tests/PHPStan/Analyser/DynamicReturnTypeExtensionTypeInferenceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ public function dataAsserts(): iterable
1414

1515
if (PHP_VERSION_ID >= 80000) {
1616
yield from $this->gatherAssertTypes(__DIR__ . '/data/dynamic-method-return-types-named-args.php');
17+
yield from $this->gatherAssertTypes(__DIR__ . '/data/dynamic-method-return-getsingle-conditional.php');
1718
}
1819

1920
yield from $this->gatherAssertTypes(__DIR__ . '/data/dynamic-method-return-compound-types.php');
20-
yield from $this->gatherAssertTypes(__DIR__ . '/data/dynamic-method-return-getsingle-conditional.php');
2121
yield from $this->gatherAssertTypes(__DIR__ . '/data/bug-7344.php');
2222
yield from $this->gatherAssertTypes(__DIR__ . '/data/bug-7391b.php');
2323
}

tests/PHPStan/Analyser/LegacyNodeScopeResolverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6431,7 +6431,7 @@ public function dataMisleadingTypes(): array
64316431
'$foo->misleadingIntReturnType()',
64326432
],
64336433
[
6434-
'mixed',
6434+
PHP_VERSION_ID >= 80000 ? 'mixed' : 'MisleadingTypes\mixed',
64356435
'$foo->misleadingMixedReturnType()',
64366436
],
64376437
];

tests/PHPStan/Analyser/nsrt/abs.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php declare(strict_types = 1);
1+
<?php // lint >= 8.0
2+
3+
declare(strict_types = 1);
24

35
namespace Abs;
46

tests/PHPStan/Analyser/nsrt/array-key-exists.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php // lint >= 8.0
22

33
namespace ArrayKeyExistsExtension;
44

tests/PHPStan/Analyser/nsrt/assert-conditional.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php // lint >= 8.0
22

33
namespace AssertConditional;
44

tests/PHPStan/Analyser/nsrt/assert-docblock.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php // lint >= 8.0
22

33
namespace AssertDocblock;
44

tests/PHPStan/Analyser/nsrt/assert-empty.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php // lint >= 8.0
22

33
namespace AssertEmpty;
44

tests/PHPStan/Analyser/nsrt/assert-inheritance.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php // lint >= 8.0
22

33
namespace AssertInheritance;
44

tests/PHPStan/Analyser/nsrt/assert-intersected.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php
1+
<?php // lint >= 8.0
22

33
namespace AssertIntersected;
44

tests/PHPStan/Analyser/nsrt/assert-invariant.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php declare(strict_types = 1);
1+
<?php // lint >= 8.0
2+
3+
declare(strict_types = 1);
24

35
namespace AssertInvariant;
46

0 commit comments

Comments
 (0)