diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 0fffed1c2bb..73a55a48830 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -33,6 +33,7 @@ jobs: php-version: - "7.4" - "8.5" + - "8.6" steps: - name: Harden the runner (Audit all outbound calls) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b7b7084dedc..09da606d205 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -29,6 +29,7 @@ jobs: - "8.3" - "8.4" - "8.5" + - "8.6" steps: - name: Harden the runner (Audit all outbound calls) diff --git a/.github/workflows/phar.yml b/.github/workflows/phar.yml index 92d2f13a9bc..23ff1d5ffe9 100644 --- a/.github/workflows/phar.yml +++ b/.github/workflows/phar.yml @@ -339,7 +339,8 @@ jobs: # packages ZTS PHP (neither ppa:ondrej/php nor Alpine); setup-php # provides thread-safe builds. No musl ZTS for the same packaging # reason. - container: ${{ matrix.target.family == 'gnu' && format('ghcr.io/phpstan/turbo-build:gnu-php{0}', matrix.php-version) || matrix.target.container }} + # alpine 3.24 carries php83 to php85, php86 only exists in edge so far + container: ${{ matrix.target.family == 'gnu' && format('ghcr.io/phpstan/turbo-build:gnu-php{0}', matrix.php-version) || (matrix.target.family == 'musl' && matrix.php-version == '8.6' && 'alpine:edge') || matrix.target.container }} timeout-minutes: 30 env: @@ -348,7 +349,7 @@ jobs: strategy: fail-fast: false matrix: - php-version: ["8.3", "8.4", "8.5"] + php-version: ["8.3", "8.4", "8.5", "8.6"] target: - name: "linux-gnu-x86_64" runs-on: "ubuntu-latest" @@ -398,7 +399,9 @@ jobs: if: matrix.target.family == 'musl' run: | V="$(echo "$PHP_MINOR" | tr -d .)" - apk add --no-cache bash curl git make g++ musl-dev linux-headers patch tar zstd \ + # php86 is only in edge/testing so far, php83 to php85 are in the stable repos + [ "$PHP_MINOR" = "8.6" ] && APK_REPO="--repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing" || APK_REPO="" + apk add --no-cache $APK_REPO bash curl git make g++ musl-dev linux-headers patch tar zstd \ "php$V" "php$V-dev" "php$V-ctype" "php$V-curl" "php$V-mbstring" \ "php$V-tokenizer" "php$V-iconv" "php$V-openssl" "php$V-phar" \ "php$V-dom" "php$V-xml" "php$V-xmlwriter" "php$V-simplexml" @@ -545,7 +548,7 @@ jobs: strategy: fail-fast: false matrix: - php-version: ["8.3", "8.4", "8.5"] + php-version: ["8.3", "8.4", "8.5", "8.6"] steps: - name: Harden the runner (Audit all outbound calls) @@ -564,17 +567,22 @@ jobs: fetch-depth: 0 - name: "Start the Alpine build container" + env: + # alpine 3.24 carries php83 to php85, php86 only exists in edge so far + ALPINE_IMAGE: ${{ matrix.php-version == '8.6' && 'alpine:edge' || 'alpine:3.24' }} run: | docker run -d --name alpine-build \ -v "$PWD:/work" -w /work \ -e PHP_MINOR -e COMPOSER_VERSION -e COMPOSER_PHAR_SHA256 \ - alpine:3.24 sleep 7200 + "$ALPINE_IMAGE" sleep 7200 - name: "Install PHP and build tools" run: | docker exec -i alpine-build sh -e <<'EOF' V="$(echo "$PHP_MINOR" | tr -d .)" - apk add --no-cache bash curl git make g++ musl-dev linux-headers patch tar zstd \ + # php86 is only in edge/testing so far, php83 to php85 are in the stable repos + [ "$PHP_MINOR" = "8.6" ] && APK_REPO="--repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing" || APK_REPO="" + apk add --no-cache $APK_REPO bash curl git make g++ musl-dev linux-headers patch tar zstd \ "php$V" "php$V-dev" "php$V-ctype" "php$V-curl" "php$V-mbstring" \ "php$V-tokenizer" "php$V-iconv" "php$V-openssl" "php$V-phar" \ "php$V-dom" "php$V-xml" "php$V-xmlwriter" "php$V-simplexml" @@ -795,7 +803,7 @@ jobs: strategy: fail-fast: false matrix: - php-version: ["8.3", "8.4", "8.5"] + php-version: ["8.3", "8.4", "8.5", "8.6"] ts: ["nts", "zts"] # The official 8.3 Windows binaries are built with VS16 (linker # 14.2x) and PHP's module loader is one-directional (module toolset @@ -810,6 +818,8 @@ jobs: vs: "vs17" - php-version: "8.5" vs: "vs17" + - php-version: "8.6" + vs: "vs18" steps: - name: "Checkout" @@ -843,8 +853,10 @@ jobs: INFIX=$([ "$MATRIX_TS" = "zts" ] && echo "" || echo "-nts") PACK="php-devel-pack-$FULL$INFIX-Win32-$MATRIX_VS-x64.zip" echo "devel pack: $PACK" + # betas and RCs are published under downloads/qa, released versions are not curl -fsSLo devel-pack.zip "https://windows.php.net/downloads/releases/$PACK" \ - || curl -fsSLo devel-pack.zip "https://windows.php.net/downloads/releases/archives/$PACK" + || curl -fsSLo devel-pack.zip "https://windows.php.net/downloads/releases/archives/$PACK" \ + || curl -fsSLo devel-pack.zip "https://windows.php.net/downloads/qa/$PACK" unzip -q devel-pack.zip -d /c/php-devel git clone -q https://github.com/php/php-sdk-binary-tools.git /c/php-sdk @@ -989,7 +1001,7 @@ jobs: # vs17-built official PHP loads it fine. matrix: operating-system: ["ubuntu-latest", "windows-latest"] - php-version: ["8.3", "8.4", "8.5"] + php-version: ["8.3", "8.4", "8.5", "8.6"] ts: ["nts", "zts"] script: ["make tests", "make phpstan"] # macOS runs the shipped ad-hoc-signed arm64 binary; there is no @@ -1085,7 +1097,7 @@ jobs: strategy: fail-fast: false matrix: - php-version: ["7.4", "8.0", "8.1", "8.2", "8.3", "8.4", "8.5"] + php-version: ["7.4", "8.0", "8.1", "8.2", "8.3", "8.4", "8.5", "8.6"] steps: - name: Harden the runner (Audit all outbound calls) diff --git a/.github/workflows/reflection-golden-test.yml b/.github/workflows/reflection-golden-test.yml index 577761982fb..0408433fb14 100644 --- a/.github/workflows/reflection-golden-test.yml +++ b/.github/workflows/reflection-golden-test.yml @@ -72,6 +72,7 @@ jobs: - "8.3" - "8.4" - "8.5" + - "8.6" steps: - name: Harden the runner (Audit all outbound calls) diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index d5c74ba2b5b..2c35ca86165 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -35,6 +35,7 @@ jobs: - "8.3" - "8.4" - "8.5" + - "8.6" operating-system: [ubuntu-latest, windows-latest] steps: @@ -98,6 +99,7 @@ jobs: - "8.3" - "8.4" - "8.5" + - "8.6" steps: - name: Harden the runner (Audit all outbound calls) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1ba00dcffdc..43bbc64fd39 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,6 +35,7 @@ jobs: - "8.3" - "8.4" - "8.5" + - "8.6" operating-system: [ ubuntu-latest, windows-latest ] steps: diff --git a/.github/workflows/turbo-build-image.yml b/.github/workflows/turbo-build-image.yml index e7e0e9a5817..6091c452792 100644 --- a/.github/workflows/turbo-build-image.yml +++ b/.github/workflows/turbo-build-image.yml @@ -45,7 +45,7 @@ jobs: strategy: fail-fast: false matrix: - php-version: ["8.3", "8.4", "8.5"] + php-version: ["8.3", "8.4", "8.5", "8.6"] platform: - arch: "amd64" runs-on: "ubuntu-latest" @@ -97,7 +97,7 @@ jobs: strategy: matrix: - php-version: ["8.3", "8.4", "8.5"] + php-version: ["8.3", "8.4", "8.5", "8.6"] env: TAG: "ghcr.io/phpstan/turbo-build:gnu-php${{ matrix.php-version }}" diff --git a/conf/parametersSchema.neon b/conf/parametersSchema.neon index 5d968573089..8b6d821fe97 100644 --- a/conf/parametersSchema.neon +++ b/conf/parametersSchema.neon @@ -116,10 +116,10 @@ parametersSchema: loadLimit: schema(float(), nullable()) ]) phpVersion: schema(anyOf( - schema(int(), min(70100), max(80599)), + schema(int(), min(70100), max(80699)), structure([ - min: schema(int(), min(70100), max(80599)), - max: schema(int(), min(70100), max(80599)) + min: schema(int(), min(70100), max(80699)), + max: schema(int(), min(70100), max(80699)) ]) ), nullable()) polluteScopeWithLoopInitialAssignments: bool() diff --git a/e2e/composer-min-open-end-version/test.php b/e2e/composer-min-open-end-version/test.php index 9ed998185b8..794040a57f2 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, 80699>', PHP_VERSION_ID); \PHPStan\Testing\assertType('8', PHP_MAJOR_VERSION); -\PHPStan\Testing\assertType('int<1, 5>', PHP_MINOR_VERSION); +\PHPStan\Testing\assertType('int<1, 6>', 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 9ed998185b8..794040a57f2 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, 80699>', PHP_VERSION_ID); \PHPStan\Testing\assertType('8', PHP_MAJOR_VERSION); -\PHPStan\Testing\assertType('int<1, 5>', PHP_MINOR_VERSION); +\PHPStan\Testing\assertType('int<1, 6>', 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 3cae7a0628f..ff19dad613f 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, 80699>', 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 73f510e0dca..3f7d455ed99 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 = 80599; + public const MAX_PHP_VERSION = 80699; 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 193a55c53cf..0c68a2bc87b 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, 80599>', + 'int<80000, 80699>', __DIR__ . '/data/scope-constants-global.php', ], [ - 'int<80000, 80599>', + 'int<80000, 80699>', __DIR__ . '/data/scope-constants-namespace.php', ], ]; diff --git a/tests/PHPStan/Analyser/nsrt/node-callback-scope.php b/tests/PHPStan/Analyser/nsrt/node-callback-scope.php index 85519a3c71c..01a88340dc9 100644 --- a/tests/PHPStan/Analyser/nsrt/node-callback-scope.php +++ b/tests/PHPStan/Analyser/nsrt/node-callback-scope.php @@ -479,7 +479,7 @@ function doFoo(): void { } function (): void { - assertType('int<50207, 80599>', PHP_VERSION_ID); + assertType('int<50207, 80699>', PHP_VERSION_ID); }; function (int $i) { diff --git a/tests/PHPStan/Analyser/nsrt/predefined-constants.php b/tests/PHPStan/Analyser/nsrt/predefined-constants.php index 7c38d3833b5..95961c5acaf 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, 80599>', PHP_VERSION_ID); +assertType('int<50207, 80699>', 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 3687e60e075..ba7db2df2b1 100644 --- a/tests/PHPStan/Php/PhpVersionFactoryTest.php +++ b/tests/PHPStan/Php/PhpVersionFactoryTest.php @@ -93,8 +93,14 @@ public static function dataCreate(): array [ null, '8.6', - 80599, - '8.5.99', + 80600, + '8.6', + ], + [ + null, + '8.7', + 80699, + '8.6.99', ], ]; }