diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 16ed00181a..e42c6f23cf 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -28,6 +28,7 @@ jobs: - "8.2" - "8.3" - "8.4" + - "8.5" steps: - name: "Checkout" diff --git a/.github/workflows/reflection-golden-test.yml b/.github/workflows/reflection-golden-test.yml index 91b38f9e13..44cceae778 100644 --- a/.github/workflows/reflection-golden-test.yml +++ b/.github/workflows/reflection-golden-test.yml @@ -67,6 +67,7 @@ jobs: - "8.2" - "8.3" - "8.4" + - "8.5" steps: - uses: Wandalen/wretry.action@v3.8.0 diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index af50f11f51..a49e5e7623 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -34,6 +34,7 @@ jobs: - "8.2" - "8.3" - "8.4" + - "8.5" operating-system: [ubuntu-latest, windows-latest] steps: @@ -80,6 +81,7 @@ jobs: - "8.2" - "8.3" - "8.4" + - "8.5" steps: - name: "Checkout" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 328020a361..c431ecee52 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,6 +35,7 @@ jobs: - "8.2" - "8.3" - "8.4" + - "8.5" operating-system: [ ubuntu-latest, windows-latest ] steps: diff --git a/composer.json b/composer.json index 1c0c469983..5f294a4c5e 100644 --- a/composer.json +++ b/composer.json @@ -233,6 +233,11 @@ ], "minimum-stability": "dev", "prefer-stable": true, + "scripts": { + "post-install-cmd": [ + "rm -f vendor/symfony/polyfill-php80/Resources/stubs/Attribute.php" + ] + }, "bin": [ "bin/phpstan" ] diff --git a/conf/parametersSchema.neon b/conf/parametersSchema.neon index 3f60d6383d..76d8e86b40 100644 --- a/conf/parametersSchema.neon +++ b/conf/parametersSchema.neon @@ -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() diff --git a/e2e/composer-min-open-end-version/test.php b/e2e/composer-min-open-end-version/test.php index d4d06a34eb..9ed998185b 100644 --- a/e2e/composer-min-open-end-version/test.php +++ b/e2e/composer-min-open-end-version/test.php @@ -1,6 +1,6 @@ ', 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); diff --git a/e2e/composer-min-version/test.php b/e2e/composer-min-version/test.php index d4d06a34eb..9ed998185b 100644 --- a/e2e/composer-min-version/test.php +++ b/e2e/composer-min-version/test.php @@ -1,6 +1,6 @@ ', 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); diff --git a/e2e/composer-no-versions/test.php b/e2e/composer-no-versions/test.php index 28c8a3183b..3cae7a0628 100644 --- a/e2e/composer-no-versions/test.php +++ b/e2e/composer-no-versions/test.php @@ -1,6 +1,6 @@ ', 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); diff --git a/src/Php/PhpVersionFactory.php b/src/Php/PhpVersionFactory.php index eb71104673..73f510e0dc 100644 --- a/src/Php/PhpVersionFactory.php +++ b/src/Php/PhpVersionFactory.php @@ -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; diff --git a/tests/PHPStan/Analyser/ScopePhpVersionTest.php b/tests/PHPStan/Analyser/ScopePhpVersionTest.php index 395cc0891b..193a55c53c 100644 --- a/tests/PHPStan/Analyser/ScopePhpVersionTest.php +++ b/tests/PHPStan/Analyser/ScopePhpVersionTest.php @@ -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', ], ]; diff --git a/tests/PHPStan/Analyser/nsrt/predefined-constants.php b/tests/PHPStan/Analyser/nsrt/predefined-constants.php index 9d9d1b1fc5..7c38d3833b 100644 --- a/tests/PHPStan/Analyser/nsrt/predefined-constants.php +++ b/tests/PHPStan/Analyser/nsrt/predefined-constants.php @@ -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); diff --git a/tests/PHPStan/Php/PhpVersionFactoryTest.php b/tests/PHPStan/Php/PhpVersionFactoryTest.php index adc5564253..3687e60e07 100644 --- a/tests/PHPStan/Php/PhpVersionFactoryTest.php +++ b/tests/PHPStan/Php/PhpVersionFactoryTest.php @@ -81,8 +81,8 @@ public static function dataCreate(): array [ null, '8.5', - 80499, - '8.4.99', + 80500, + '8.5', ], [ null, @@ -90,6 +90,12 @@ public static function dataCreate(): array 80095, '8.0.95', ], + [ + null, + '8.6', + 80599, + '8.5.99', + ], ]; }