Skip to content

Commit 6fee1ce

Browse files
committed
Add experimental PHP 8.5 support to CI workflow and run-tests.sh
1 parent 4027ad9 commit 6fee1ce

File tree

4 files changed

+201
-4
lines changed

4 files changed

+201
-4
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
/phpstan-baseline-8.2.neon linguist-generated
1717
/phpstan-baseline-8.3.neon linguist-generated
1818
/phpstan-baseline-8.4.neon linguist-generated
19+
/phpstan-baseline-8.5.neon linguist-generated
1920
/phpunit* export-ignore
2021
/scripts export-ignore
2122
/src/Toolkit/Cli/CliOptionBuilder.php linguist-generated

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ jobs:
105105
- "8.1"
106106
- "8.0"
107107
- "7.4"
108+
- "8.5"
108109

109110
runs-on: ubuntu-24.04
110111

@@ -172,6 +173,8 @@ jobs:
172173
php-version: "7.4"
173174
- os: windows-latest
174175
php-version: "7.4"
176+
- os: ubuntu-24.04
177+
php-version: "8.5"
175178

176179
runs-on: ${{ matrix.os }}
177180

phpstan-baseline-8.5.neon

Lines changed: 188 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/run-tests.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,19 @@ function run() {
1919
}
2020

2121
function run_with_php_versions() {
22-
local php versions=()
22+
local php version versions=()
2323
while [[ -z $1 ]] || [[ $1 == [78][0-9] ]]; do
2424
if type -P "php$1" >/dev/null; then
2525
versions[${#versions[@]}]=php$1
2626
fi
2727
shift
2828
done
2929
for php in "${versions[@]-php}"; do
30-
run "$php" "$@" || failed[${#failed[@]}]="$* on $php"
30+
version=${php#php}
31+
version=${version:-$(php -r 'echo PHP_MAJOR_VERSION . PHP_MINOR_VERSION;')}
32+
run "$php" "$@" ||
33+
((version > released)) ||
34+
failed[${#failed[@]}]="$* on $php"
3135
done
3236
}
3337

@@ -45,14 +49,15 @@ function on_exit() {
4549
die "must run from root of package folder"
4650

4751
failed=()
52+
released=84
4853

4954
run scripts/generate.php --check
5055
run php84 tools/php-cs-fixer check --diff --verbose
5156
run tools/pretty-php --diff
52-
run_with_php_versions 84 74 83 82 81 80 vendor/bin/phpstan
57+
run_with_php_versions 84 74 83 82 81 80 85 vendor/bin/phpstan
5358
run scripts/stop-mockoon.sh || (($? == 1)) || die 'error stopping mockoon'
5459
run scripts/start-mockoon.sh >/dev/null
5560
trap on_exit EXIT
56-
run_with_php_versions 84 74 83 82 81 80 vendor/bin/phpunit
61+
run_with_php_versions 84 74 83 82 81 80 85 vendor/bin/phpunit
5762

5863
[[ -z ${failed+1} ]]

0 commit comments

Comments
 (0)