Skip to content

Commit 9d0e070

Browse files
committed
Allow running on PHP 8.1
1 parent 4e5ed5d commit 9d0e070

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

conf/config.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ parametersSchema:
219219
minimumNumberOfJobsPerProcess: int(),
220220
buffer: int()
221221
])
222-
phpVersion: schema(anyOf(schema(int(), min(70100), max(80099))), nullable())
222+
phpVersion: schema(anyOf(schema(int(), min(70100), max(80199))), nullable())
223223
polluteScopeWithLoopInitialAssignments: bool()
224224
polluteScopeWithAlwaysIterableForeach: bool()
225225
propertyAlwaysWrittenTags: listOf(string())

src/Php/PhpVersionFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function create(): PhpVersion
2727
$parts = explode('.', $this->composerPhpVersion);
2828
$tmp = (int) $parts[0] * 10000 + (int) ($parts[1] ?? 0) * 100 + (int) ($parts[2] ?? 0);
2929
$tmp = max($tmp, 70100);
30-
$versionId = min($tmp, 80099);
30+
$versionId = min($tmp, 80199);
3131
}
3232

3333
if ($versionId === null) {

tests/PHPStan/Php/PhpVersionFactoryTest.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,14 @@ public function dataCreate(): array
5555
[
5656
null,
5757
'8.1',
58-
80099,
59-
'8.0.99',
58+
80100,
59+
'8.1',
60+
],
61+
[
62+
null,
63+
'8.2',
64+
80199,
65+
'8.1.99',
6066
],
6167
[
6268
null,

0 commit comments

Comments
 (0)