Skip to content

Commit cccb9f3

Browse files
committed
Build fixes
1 parent 785b663 commit cccb9f3

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

tests/PHPStan/Reflection/ParametersAcceptorSelectorTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use PHPStan\Type\StringType;
2222
use PHPStan\Type\UnionType;
2323
use PHPStan\Type\VerbosityLevel;
24+
use const PHP_VERSION_ID;
2425

2526
class ParametersAcceptorSelectorTest extends \PHPStan\Testing\TestCase
2627
{
@@ -175,7 +176,7 @@ public function dataSelectFromTypes(): \Generator
175176
null,
176177
[
177178
new NativeParameterReflection(
178-
'str|token',
179+
PHP_VERSION_ID < 80000 ? 'str|token' : 'string|token',
179180
false,
180181
new StringType(),
181182
PassedByReference::createNo(),

tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,13 @@ public function testImplodeOnPhp74(): void
312312
];
313313
if (PHP_VERSION_ID < 70400) {
314314
$errors = [];
315+
} elseif (PHP_VERSION_ID >= 80000) {
316+
$errors = [
317+
[
318+
'Parameter #2 $pieces of function implode expects array, string given.',
319+
8,
320+
],
321+
];
315322
}
316323

317324
$this->analyse([__DIR__ . '/data/implode-74.php'], $errors);

tests/PHPStan/Rules/Methods/CallMethodsRuleTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public function testCallMethods(): void
147147
108,
148148
],
149149
[
150-
'Method PDO::query() invoked with 0 parameters, 1-4 required.',
150+
PHP_VERSION_ID < 80000 ? 'Method PDO::query() invoked with 0 parameters, 1-4 required.' : 'Method PDO::query() invoked with 0 parameters, at least 1 required.',
151151
113,
152152
],
153153
[

0 commit comments

Comments
 (0)