Skip to content

Commit e09b381

Browse files
authored
Merge pull request #667 from asgrim/658-php86-support
658: PHP 8.6 (pre-release) support
2 parents 73ae409 + f4d2cf3 commit e09b381

16 files changed

Lines changed: 92 additions & 72 deletions

.github/pie-behaviour-tests/Dockerfile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,13 @@ RUN export DEBIAN_FRONTEND="noninteractive"; \
2929
ARG PHP_VERSION=8.4
3030
RUN mkdir -p /usr/local/src/php; \
3131
cd /usr/local/src/php; \
32-
FULL_LATEST_VERSION=`curl -fsSL "https://www.php.net/releases/index.php?json&max=1&version=$PHP_VERSION" | jq -r '.[].source[]|select(.filename|endswith(".gz")).filename'`; \
33-
wget -O php.tgz "https://www.php.net/distributions/$FULL_LATEST_VERSION" ; \
32+
if [ "${PHP_VERSION%-dev}" != "$PHP_VERSION" ]; then \
33+
PHP_SRC_DOWNLOAD_URL=`curl -fsSL "https://www.php.net/pre-release-builds.php?format=json" | jq -r --arg v "${PHP_VERSION%-dev}" 'to_entries[] | select(.key | startswith($v)) | .value.release.files.gz.path'` ; \
34+
else \
35+
FULL_LATEST_VERSION=`curl -fsSL "https://www.php.net/releases/index.php?json&max=1&version=$PHP_VERSION" | jq -r '.[].source[]|select(.filename|endswith(".gz")).filename'`; \
36+
PHP_SRC_DOWNLOAD_URL="https://www.php.net/distributions/$FULL_LATEST_VERSION" ; \
37+
fi; \
38+
wget -O php.tgz "$PHP_SRC_DOWNLOAD_URL" ; \
3439
tar zxf php.tgz ; \
3540
rm php.tgz ; \
3641
ls -l ; \
@@ -44,7 +49,7 @@ RUN mkdir -p /usr/local/src/php; \
4449
RUN touch /usr/local/lib/php.ini
4550

4651
COPY --from=ghcr.io/php/pie:bin /pie /usr/local/bin/pie
47-
RUN pie install xdebug/xdebug
52+
RUN BOX_REQUIREMENT_CHECKER=0 pie install xdebug/xdebug
4853

4954
COPY --from=clone_ext_repo /example-pie-extension /example-pie-extension
5055

.github/workflows/continuous-integration.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
- '8.3'
2222
- '8.4'
2323
- '8.5'
24+
- '8.6'
2425
steps:
2526
- name: Setup PHP
2627
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 #2.37.2
@@ -121,6 +122,7 @@ jobs:
121122
- '8.3'
122123
- '8.4'
123124
- '8.5'
125+
#- '8.6' # @todo bundled repo doesn't support non-stable PHP versions
124126
steps:
125127
- name: "Purge built-in PHP version"
126128
run: |
@@ -160,8 +162,15 @@ jobs:
160162
libzip-dev
161163
- name: "Set php-src download URL"
162164
run: |
163-
DIST_URL=`curl -fsSL "https://www.php.net/releases/index.php?json&max=1&version=${{ matrix.php-versions }}" | jq -r '.[].source[]|select(.filename|endswith(".gz")).filename'`
164-
echo "php_src_download_url=https://www.php.net/distributions/$DIST_URL" >> $GITHUB_ENV
165+
if [[ "${{ matrix.php-versions }}" == *-dev ]]; then
166+
VERSION="${{ matrix.php-versions }}"
167+
VERSION="${VERSION%-dev}"
168+
DIST_URL=`curl -fsSL "https://www.php.net/pre-release-builds.php?format=json" | jq -r --arg v "$VERSION" 'to_entries[] | select(.key | startswith($v)) | .value.release.files.gz.path'`
169+
echo "php_src_download_url=$DIST_URL" >> $GITHUB_ENV
170+
else
171+
DIST_URL=`curl -fsSL "https://www.php.net/releases/index.php?json&max=1&version=${{ matrix.php-versions }}" | jq -r '.[].source[]|select(.filename|endswith(".gz")).filename'`
172+
echo "php_src_download_url=https://www.php.net/distributions/$DIST_URL" >> $GITHUB_ENV
173+
fi
165174
- name: "Install PHP ${{ matrix.php-versions }}"
166175
env:
167176
php_src_download_url: ${{ env.php_src_download_url }}
@@ -220,6 +229,7 @@ jobs:
220229
- '8.3'
221230
- '8.4'
222231
- '8.5'
232+
#- '8.6' @todo behaviour tests depend on stable releases currently
223233
steps:
224234
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 #v7.0.0
225235
with:

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
}
2828
],
2929
"require": {
30-
"php": "8.1.*||8.2.*||8.3.*||8.4.*||8.5.*",
30+
"php": "8.1.*||8.2.*||8.3.*||8.4.*||8.5.*||8.6.*",
3131
"composer/composer": "^2.10.2",
3232
"composer/pcre": "^3.4.0",
3333
"composer/semver": "^3.4.4",
@@ -50,7 +50,7 @@
5050
"phpstan/phpstan": "^2.2.5",
5151
"phpstan/phpstan-phpunit": "^2.0.18",
5252
"phpstan/phpstan-webmozart-assert": "^2.0",
53-
"phpunit/phpunit": "^10.5.63",
53+
"phpunit/phpunit": "^10.5.64",
5454
"thecodingmachine/phpstan-safe-rule": "^1.4.7"
5555
},
5656
"replace": {

composer.lock

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

features/download-extensions.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Feature: Extensions can be downloaded with PIE
1313
Examples:
1414
| constraint | version |
1515
| 2.0.5 | 2.0.5 |
16-
| ^2.0 | 2.0.9 |
16+
| ^2.0 | 2.0.10 |
1717

1818
# pie download <ext>:dev-main
1919
@non-windows

src/Platform/TargetPlatform.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ public static function fromPhpBinaryPath(PhpBinaryPath $phpBinaryPath, int|null
9797
case 'VS17':
9898
$windowsCompiler = WindowsCompiler::VS17;
9999
break;
100+
case 'VS18':
101+
$windowsCompiler = WindowsCompiler::VS18;
102+
break;
100103
}
101104
}
102105
}

src/Platform/WindowsCompiler.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ enum WindowsCompiler
1515
case VC15;
1616
case VS16;
1717
case VS17;
18+
case VS18;
1819
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require": {
33
"xdebug/xdebug": "3.5.2",
4-
"asgrim/example-pie-extension": "2.0.9"
4+
"asgrim/example-pie-extension": "2.0.10"
55
}
66
}

test/assets/pie-install-from-lock/pie.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
55
"This file is @generated automatically"
66
],
7-
"content-hash": "bbeb326cf52bdf49183176118718973c",
7+
"content-hash": "b4a3c510277909695617f37c71009a20",
88
"packages": [
99
{
1010
"name": "asgrim/example-pie-extension",
11-
"version": "2.0.9",
11+
"version": "2.0.10",
1212
"source": {
1313
"type": "git",
1414
"url": "https://github.com/asgrim/example-pie-extension.git",
15-
"reference": "963c8d70c57c23fa2098e499a0ebffabb64748b3"
15+
"reference": "f4aa08c72cffd395e8ddbcb55622f33165da8660"
1616
},
1717
"dist": {
1818
"type": "zip",
19-
"url": "https://api.github.com/repos/asgrim/example-pie-extension/zipball/963c8d70c57c23fa2098e499a0ebffabb64748b3",
20-
"reference": "963c8d70c57c23fa2098e499a0ebffabb64748b3",
19+
"url": "https://api.github.com/repos/asgrim/example-pie-extension/zipball/f4aa08c72cffd395e8ddbcb55622f33165da8660",
20+
"reference": "f4aa08c72cffd395e8ddbcb55622f33165da8660",
2121
"shasum": ""
2222
},
2323
"require": {
@@ -53,9 +53,9 @@
5353
"description": "Example PIE extension",
5454
"support": {
5555
"issues": "https://github.com/asgrim/example-pie-extension/issues",
56-
"source": "https://github.com/asgrim/example-pie-extension/tree/2.0.9"
56+
"source": "https://github.com/asgrim/example-pie-extension/tree/2.0.10"
5757
},
58-
"time": "2026-02-04T17:27:25+00:00"
58+
"time": "2026-08-04T20:36:11+00:00"
5959
},
6060
{
6161
"name": "xdebug/xdebug",
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
only a test file

0 commit comments

Comments
 (0)