Skip to content

Commit 1bb829d

Browse files
authored
Merge branch 'main' into update-php-8.4-win-x64
2 parents aa7e1dd + 318f0b6 commit 1bb829d

20 files changed

Lines changed: 534 additions & 661 deletions

‎.github/workflows/build-php-linux.yml‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ on:
88
schedule:
99
- cron: '0 0 * * 5'
1010
workflow_dispatch:
11+
inputs:
12+
version:
13+
description: 'PHP version to build'
14+
type: choice
15+
options:
16+
- all
17+
- "8.3"
18+
- "8.4"
19+
- "8.5"
20+
default: all
1121

1222
env:
1323
GITHUB_TOKEN: ${{ secrets.PAT }}
@@ -22,7 +32,7 @@ jobs:
2232
strategy:
2333
fail-fast: false
2434
matrix:
25-
version: ["8.3", "8.4", "8.5"]
35+
version: ${{ fromJSON((github.event.inputs.version || 'all') == 'all' && '["8.3","8.4","8.5"]' || format('["{0}"]', github.event.inputs.version)) }}
2636
os: [ubuntu-latest, ubuntu-24.04-arm]
2737
include:
2838
- os: ubuntu-latest

‎.github/workflows/build-php-mac.yml‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ on:
88
schedule:
99
- cron: '0 0 * * 5'
1010
workflow_dispatch:
11+
inputs:
12+
version:
13+
description: 'PHP version to build'
14+
type: choice
15+
options:
16+
- all
17+
- "8.3"
18+
- "8.4"
19+
- "8.5"
20+
default: all
1121

1222
env:
1323
GITHUB_TOKEN: ${{ secrets.PAT }}
@@ -22,7 +32,7 @@ jobs:
2232
strategy:
2333
fail-fast: false
2434
matrix:
25-
version: ["8.3", "8.4", "8.5"]
35+
version: ${{ fromJSON((github.event.inputs.version || 'all') == 'all' && '["8.3","8.4","8.5"]' || format('["{0}"]', github.event.inputs.version)) }}
2636
os: [macos-15-intel, macos-latest]
2737
include:
2838
- os: macos-15-intel

‎.github/workflows/build-php-win.yml‎

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ on:
88
schedule:
99
- cron: '0 0 * * 5'
1010
workflow_dispatch:
11+
inputs:
12+
version:
13+
description: 'PHP version to build'
14+
type: choice
15+
options:
16+
- all
17+
- "8.3"
18+
- "8.4"
19+
- "8.5"
20+
default: all
1121

1222
env:
1323
GITHUB_TOKEN: ${{ secrets.PAT }}
@@ -22,7 +32,7 @@ jobs:
2232
strategy:
2333
fail-fast: false
2434
matrix:
25-
version: ["8.3", "8.4", "8.5"]
35+
version: ${{ fromJSON((github.event.inputs.version || 'all') == 'all' && '["8.3","8.4","8.5"]' || format('["{0}"]', github.event.inputs.version)) }}
2636
os: [windows-2025]
2737
include:
2838
- os: windows-2025
@@ -96,6 +106,18 @@ jobs:
96106
cp "zstd-${ZSTD_VERSION}-win64/include/"*.h static-php-cli/buildroot/include/
97107
rm -rf zstd.zip "zstd-${ZSTD_VERSION}-win64"
98108
109+
# SPC's bundled icu-static-win is ICU 78, whose headers require C++17.
110+
# PHP 8.3's ext/intl/config.w32 doesn't pass /std:c++17 to MSVC (8.4+
111+
# does), so intl_convertcpp.cpp fails to compile. Extract php-src
112+
# manually and patch in /std:c++17 before SPC runs the build.
113+
- name: Patch PHP 8.3 ext/intl for C++17 (ICU 78 compatibility)
114+
if: matrix.version == '8.3'
115+
shell: bash
116+
run: |
117+
cd ../static-php-cli
118+
./bin/spc.exe extract php-src
119+
sed -i 's|"/EHsc /DUNISTR_FROM_CHAR_EXPLICIT|"/std:c++17 /EHsc /DUNISTR_FROM_CHAR_EXPLICIT|' source/php-src/ext/intl/config.w32
120+
99121
- name: Build PHP
100122
run: |
101123
cd ../static-php-cli

0 commit comments

Comments
 (0)