Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
- "8.2"
- "8.3"
- "8.4"
- "8.5"

steps:
- name: "Checkout"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/reflection-golden-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ jobs:
- "8.2"
- "8.3"
- "8.4"
- "8.5"

steps:
- uses: Wandalen/[email protected]
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
- "8.2"
- "8.3"
- "8.4"
- "8.5"
operating-system: [ubuntu-latest, windows-latest]

steps:
Expand Down Expand Up @@ -79,7 +80,7 @@ jobs:
php-version:
- "8.2"
- "8.3"
- "8.4"
- "8.5"

steps:
- name: "Checkout"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
- "8.2"
- "8.3"
- "8.4"
- "8.5"
operating-system: [ ubuntu-latest, windows-latest ]

steps:
Expand Down
6 changes: 3 additions & 3 deletions conf/parametersSchema.neon
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ parametersSchema:
buffer: int()
])
phpVersion: schema(anyOf(
schema(int(), min(70100), max(80499)),
schema(int(), min(70100), max(80599)),
structure([
min: schema(int(), min(70100), max(80499)),
max: schema(int(), min(70100), max(80499))
min: schema(int(), min(70100), max(80599)),
max: schema(int(), min(70100), max(80599))
])
), nullable())
polluteScopeWithLoopInitialAssignments: bool()
Expand Down
4 changes: 2 additions & 2 deletions e2e/composer-min-open-end-version/test.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

\PHPStan\Testing\assertType('int<80100, 80499>', PHP_VERSION_ID);
\PHPStan\Testing\assertType('int<80100, 80599>', PHP_VERSION_ID);
\PHPStan\Testing\assertType('8', PHP_MAJOR_VERSION);
\PHPStan\Testing\assertType('int<1, 4>', PHP_MINOR_VERSION);
\PHPStan\Testing\assertType('int<1, 5>', PHP_MINOR_VERSION);
\PHPStan\Testing\assertType('int<0, max>', PHP_RELEASE_VERSION);
4 changes: 2 additions & 2 deletions e2e/composer-min-version/test.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

\PHPStan\Testing\assertType('int<80100, 80499>', PHP_VERSION_ID);
\PHPStan\Testing\assertType('int<80100, 80599>', PHP_VERSION_ID);
\PHPStan\Testing\assertType('8', PHP_MAJOR_VERSION);
\PHPStan\Testing\assertType('int<1, 4>', PHP_MINOR_VERSION);
\PHPStan\Testing\assertType('int<1, 5>', PHP_MINOR_VERSION);
\PHPStan\Testing\assertType('int<0, max>', PHP_RELEASE_VERSION);
2 changes: 1 addition & 1 deletion e2e/composer-no-versions/test.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

\PHPStan\Testing\assertType('int<50207, 80499>', PHP_VERSION_ID);
\PHPStan\Testing\assertType('int<50207, 80599>', PHP_VERSION_ID);
\PHPStan\Testing\assertType('int<5, 8>', PHP_MAJOR_VERSION);
\PHPStan\Testing\assertType('int<0, max>', PHP_MINOR_VERSION);
\PHPStan\Testing\assertType('int<0, max>', PHP_RELEASE_VERSION);
2 changes: 1 addition & 1 deletion src/Php/PhpVersionFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final class PhpVersionFactory
{

public const MIN_PHP_VERSION = 70100;
public const MAX_PHP_VERSION = 80499;
public const MAX_PHP_VERSION = 80599;
public const MAX_PHP5_VERSION = 50699;
public const MAX_PHP7_VERSION = 70499;

Expand Down
4 changes: 2 additions & 2 deletions tests/PHPStan/Analyser/ScopePhpVersionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ public static function dataTestPhpVersion(): array
{
return [
[
'int<80000, 80499>',
'int<80000, 80599>',
__DIR__ . '/data/scope-constants-global.php',
],
[
'int<80000, 80499>',
'int<80000, 80599>',
__DIR__ . '/data/scope-constants-namespace.php',
],
];
Expand Down
2 changes: 1 addition & 1 deletion tests/PHPStan/Analyser/nsrt/predefined-constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
assertType('int<5, 8>', PHP_MAJOR_VERSION);
assertType('int<0, max>', PHP_MINOR_VERSION);
assertType('int<0, max>', PHP_RELEASE_VERSION);
assertType('int<50207, 80499>', PHP_VERSION_ID);
assertType('int<50207, 80599>', PHP_VERSION_ID);
assertType('string', PHP_EXTRA_VERSION);
assertType('0|1', PHP_ZTS);
assertType('0|1', PHP_DEBUG);
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 @@ -81,15 +81,21 @@ public static function dataCreate(): array
[
null,
'8.5',
80499,
'8.4.99',
80500,
'8.5',
],
[
null,
'8.0.95',
80095,
'8.0.95',
],
[
null,
'8.6',
80599,
'8.5.99',
],
];
}

Expand Down
Loading