Skip to content

Commit 6dae756

Browse files
committed
Fixes
1 parent b11cdf6 commit 6dae756

7 files changed

Lines changed: 7 additions & 1 deletion

File tree

resources/constantToFunctionParameterMap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
'type' => 'bitmask',
5959
'constants' => [
6060
'JSON_INVALID_UTF8_IGNORE',
61-
'JSON_THROW_ON_ERROR',
6261
],
6362
],
6463
],
@@ -1021,6 +1020,7 @@
10211020
'LOG_CONS',
10221021
'LOG_NDELAY',
10231022
'LOG_ODELAY',
1023+
'LOG_NOWAIT',
10241024
'LOG_PERROR',
10251025
'LOG_PID',
10261026
],

src/Rules/FunctionCallParametersCheck.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ public function check(
415415
if (
416416
$parameter instanceof ExtendedParameterReflection
417417
&& $parameter->getAllowedConstants() !== null
418+
&& $scope->getPhpVersion()->supportsNamedArguments()->yes()
418419
) {
419420
$constantReflections = $this->resolveConstantReflections($argumentValue, $scope);
420421
if ($constantReflections !== null) {

tests/PHPStan/Rules/Classes/InstantiationRuleTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,7 @@ public function testBug11006(): void
615615
$this->analyse([__DIR__ . '/data/bug-11006.php'], []);
616616
}
617617

618+
#[RequiresPhp('>= 8.0')]
618619
public function testConstantParameterCheckInstantiation(): void
619620
{
620621
$this->analyse([__DIR__ . '/data/constant-parameter-check-instantiation.php'], [

tests/PHPStan/Rules/Functions/CallCallablesRuleTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@ public function testPipeOperator(): void
355355
]);
356356
}
357357

358+
#[RequiresPhp('>= 8.0')]
358359
public function testConstantParameterCheckCallables(): void
359360
{
360361
$this->checkExplicitMixed = false;

tests/PHPStan/Rules/Functions/CallToFunctionParametersRuleTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2770,6 +2770,7 @@ public function testBug14312b(): void
27702770
$this->analyse([__DIR__ . '/data/bug-14312b.php'], []);
27712771
}
27722772

2773+
#[RequiresPhp('>= 8.0')]
27732774
public function testConstantParameterCheck(): void
27742775
{
27752776
$this->analyse([__DIR__ . '/data/constant-parameter-check.php'], [

tests/PHPStan/Rules/Methods/CallMethodsRuleTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3921,6 +3921,7 @@ public function testBug7369(): void
39213921
]);
39223922
}
39233923

3924+
#[RequiresPhp('>= 8.0')]
39243925
public function testConstantParameterCheckMethods(): void
39253926
{
39263927
$this->checkThisOnly = false;

tests/PHPStan/Rules/Methods/CallStaticMethodsRuleTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -997,6 +997,7 @@ public function testPipeOperator(): void
997997
]);
998998
}
999999

1000+
#[RequiresPhp('>= 8.0')]
10001001
public function testConstantParameterCheckStatic(): void
10011002
{
10021003
$this->checkThisOnly = false;

0 commit comments

Comments
 (0)