Skip to content

Commit

Permalink
Allow phpVersion up to 80099
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Mar 31, 2021
1 parent 702bdc9 commit 4db2e14
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion conf/config.neon
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ parametersSchema:
minimumNumberOfJobsPerProcess: int(),
buffer: int()
])
phpVersion: schema(anyOf(schema(int(), min(70100), max(80000))), nullable())
phpVersion: schema(anyOf(schema(int(), min(70100), max(80099))), nullable())
polluteScopeWithLoopInitialAssignments: bool()
polluteScopeWithAlwaysIterableForeach: bool()
polluteCatchScopeWithTryAssignments: bool()
Expand Down
2 changes: 1 addition & 1 deletion src/Php/PhpVersionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function create(): PhpVersion
$parts = explode('.', $this->composerPhpVersion);
$tmp = (int) $parts[0] * 10000 + (int) ($parts[1] ?? 0) * 100 + (int) ($parts[2] ?? 0);
$tmp = max($tmp, 70100);
$versionId = min($tmp, 80000);
$versionId = min($tmp, 80099);
}

if ($versionId === null) {
Expand Down
10 changes: 8 additions & 2 deletions tests/PHPStan/Php/PhpVersionFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,14 @@ public function dataCreate(): array
[
null,
'8.1',
80000,
'8.0',
80099,
'8.0.99',
],
[
null,
'8.0.95',
80095,
'8.0.95',
],
];
}
Expand Down

0 comments on commit 4db2e14

Please sign in to comment.