Skip to content
Open
Show file tree
Hide file tree
Changes from all 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/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
php-version:
- "7.4"
- "8.5"
- "8.6"

steps:
- name: Harden the runner (Audit all outbound calls)
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
- "8.3"
- "8.4"
- "8.5"
- "8.6"

steps:
- name: Harden the runner (Audit all outbound calls)
Expand Down
32 changes: 22 additions & 10 deletions .github/workflows/phar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,8 @@
# 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:
Expand All @@ -348,7 +349,7 @@
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"
Expand Down Expand Up @@ -396,9 +397,11 @@
# all of this in.
- name: "Install PHP and build tools (Alpine container)"
if: matrix.target.family == 'musl'
run: |

Check failure on line 400 in .github/workflows/phar.yml

View workflow job for this annotation

GitHub Actions / actionlint

shellcheck reported issue in this script: SC2086:info:4:20: Double quote to prevent globbing and word splitting
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"
Expand Down Expand Up @@ -545,7 +548,7 @@
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)
Expand All @@ -564,17 +567,22 @@
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"
Expand Down Expand Up @@ -795,7 +803,7 @@
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
Expand All @@ -810,6 +818,8 @@
vs: "vs17"
- php-version: "8.5"
vs: "vs17"
- php-version: "8.6"
vs: "vs18"

steps:
- name: "Checkout"
Expand Down Expand Up @@ -843,8 +853,10 @@
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
Expand Down Expand Up @@ -989,7 +1001,7 @@
# 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
Expand Down Expand Up @@ -1085,7 +1097,7 @@
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)
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 @@ -72,6 +72,7 @@ jobs:
- "8.3"
- "8.4"
- "8.5"
- "8.6"

steps:
- name: Harden the runner (Audit all outbound calls)
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
- "8.3"
- "8.4"
- "8.5"
- "8.6"
operating-system: [ubuntu-latest, windows-latest]

steps:
Expand Down Expand Up @@ -98,6 +99,7 @@ jobs:
- "8.3"
- "8.4"
- "8.5"
- "8.6"

steps:
- name: Harden the runner (Audit all outbound calls)
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.3"
- "8.4"
- "8.5"
- "8.6"
operating-system: [ ubuntu-latest, windows-latest ]

steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/turbo-build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 }}"
Expand Down
6 changes: 3 additions & 3 deletions conf/parametersSchema.neon
Original file line number Diff line number Diff line change
Expand Up @@ -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()
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, 80599>', 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);
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, 80599>', 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);
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, 80599>', 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);
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 = 80599;
public const MAX_PHP_VERSION = 80699;
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, 80599>',
'int<80000, 80699>',
__DIR__ . '/data/scope-constants-global.php',
],
[
'int<80000, 80599>',
'int<80000, 80699>',
__DIR__ . '/data/scope-constants-namespace.php',
],
];
Expand Down
2 changes: 1 addition & 1 deletion tests/PHPStan/Analyser/nsrt/node-callback-scope.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
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, 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);
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 @@ -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',
],
];
}
Expand Down
Loading