Skip to content

Commit a66a921

Browse files
committed
Merge remote-tracking branch 'upstream/stable' into stable
2 parents 4e4bd2f + 3296ff3 commit a66a921

3 files changed

Lines changed: 116 additions & 27 deletions

File tree

.github/workflows/main-pm-matrix.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,72 @@ jobs:
8080
workspace.tar.gz
8181
if-no-files-found: error
8282

83+
macos:
84+
name: MacOS ${{ matrix.artifact-name }}
85+
runs-on: ${{ matrix.image }}
86+
strategy:
87+
matrix:
88+
include:
89+
- target-name: mac-x86-64
90+
artifact-name: x86_64
91+
image: macos-15-intel
92+
- target-name: mac-arm64
93+
artifact-name: arm64
94+
image: macos-15
95+
96+
steps:
97+
- uses: actions/checkout@v5
98+
99+
- name: Install tools and dependencies
100+
run: |
101+
#workaround github actions default image providing outdated pkg-config
102+
brew uninstall --ignore-dependencies --force pkg-config@0.29.2 || true
103+
brew install libtool autoconf automake pkg-config bison re2c
104+
105+
- name: Prepare compile.sh download cache
106+
id: download-cache
107+
uses: actions/cache@v4
108+
with:
109+
path: ./download_cache
110+
key: compile-sh-cache-ssl-https-${{ hashFiles('./compile.sh') }}
111+
restore-keys: compile-sh-cache-ssl-https-
112+
113+
- name: Compile PHP
114+
run: |
115+
export PATH="/usr/local/opt/bison/bin:$PATH"
116+
set -ex
117+
trap "exit 1" ERR
118+
./compile.sh -t ${{ matrix.target-name }} -j4 -g -F -P ${{ inputs.pm-version-major }} -c ./download_cache -D -z ${{ inputs.php-version-base }}
119+
120+
- name: Create tarball
121+
run: |
122+
tar -czf ./PHP-${{ inputs.php-version-base }}-MacOS-${{ matrix.artifact-name }}-PM${{ inputs.pm-version-major }}.tar.gz bin
123+
tar -czf ./Z-PHP-${{ inputs.php-version-base }}-MacOS-${{ matrix.artifact-name }}-PM${{ inputs.pm-version-major }}-debugging-symbols.tar.gz bin-debug
124+
125+
- name: Upload artifacts
126+
uses: actions/upload-artifact@v5
127+
if: always()
128+
with:
129+
name: PHP-${{ inputs.php-version-base }}-MacOS-${{ matrix.artifact-name }}-PM${{ inputs.pm-version-major }}
130+
path: |
131+
./*PHP-${{ inputs.php-version-base }}-MacOS-${{ matrix.artifact-name}}-PM${{ inputs.pm-version-major }}*.tar.gz
132+
install.log
133+
compile.sh
134+
if-no-files-found: error
135+
136+
- name: Prepare workspace for upload
137+
if: failure()
138+
run: tar -czf workspace.tar.gz install_data
139+
140+
- name: Upload workspace
141+
uses: actions/upload-artifact@v5
142+
if: failure()
143+
with:
144+
name: PHP-${{ inputs.php-version-base }}-MacOS-${{ matrix.artifact-name }}-workspace-PM${{ inputs.pm-version-major }}
145+
path: |
146+
workspace.tar.gz
147+
if-no-files-found: error
148+
83149
windows:
84150
name: Windows
85151
runs-on: windows-2022

compile.sh

Lines changed: 45 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
PHP_VERSIONS=("8.1.33" "8.2.29" "8.3.28" "8.4.15" "8.5.0")
2+
PHP_VERSIONS=("8.1.34" "8.2.30" "8.3.29" "8.4.16" "8.5.0")
33

44
#### NOTE: Tags with "v" prefixes behave weirdly in the GitHub API. They'll be stripped in some places but not others.
55
#### Use commit hashes to avoid this.
@@ -15,23 +15,23 @@ CURL_VERSION="curl-8_13_0"
1515
YAML_VERSION="0.2.5"
1616
LEVELDB_VERSION="1c7564468b41610da4f498430e795ca4de0931ff" #release not tagged
1717
LIBXML_VERSION="2.15.1"
18-
LIBPNG_VERSION="1.6.50"
18+
LIBPNG_VERSION="1.6.53"
1919
LIBJPEG_VERSION="9f"
2020
OPENSSL_VERSION="3.6.0"
2121
LIBZIP_VERSION="1.11.4"
22-
SQLITE3_VERSION="3500400" #3.50.4
23-
LIBDEFLATE_VERSION="96836d7d9d10e3e0d53e6edb54eb908514e336c4" #1.24 - see above note about "v" prefixes
22+
SQLITE3_VERSION="3510100" #3.51.1
23+
LIBDEFLATE_VERSION="c8c56a20f8f621e6a966b716b31f1dedab6a41e3" #1.25 - see above note about "v" prefixes
2424
LIBRDKAFKA_VER="2.12.1"
2525
LIBZSTD_VER="1.5.7"
2626
LIBGRPC_VER="1.76.0"
2727
LIBSNAPPY_VER="1.2.2"
2828
SASL2_VERSION="2.1.28"
2929

30-
EXT_PMMPTHREAD_VERSION="6.2.0"
31-
EXT_YAML_VERSION="2.2.5"
30+
EXT_PMMPTHREAD_VERSION="6.3.0"
31+
EXT_YAML_VERSION="2.3.0"
3232
EXT_LEVELDB_VERSION="88071eb1b1eae96af043229104b9d813f7cbe40c" #release not tagged
3333
EXT_CHUNKUTILS2_VERSION="0.3.5"
34-
EXT_XDEBUG_VERSION="3.4.7"
34+
EXT_XDEBUG_VERSION="3.5.0"
3535
EXT_IGBINARY_VERSION="3.2.16"
3636
EXT_CRYPTO_VERSION="999b3c7edbc7f8ca4fdeb0bb4bbae488ad0daf07" #release not tagged
3737
EXT_SNAPPY_VERSION="0.2.3"
@@ -46,9 +46,7 @@ EXT_ZSTD_VERSION="0.15.2"
4646
EXT_GRPC_VERSION="1.76.0"
4747
EXT_VANILLAGENERATOR_VERSION="abd059fd2ca79888aab3b9c5070d83ceea55fada"
4848

49-
EXT_PMMPTHREAD_VERSION_PHP85="4aa34a27feaa43adba5f1e93939828d1d7afdefc"
50-
EXT_XDEBUG_VERSION_PHP85="3.5.0alpha2"
51-
EXT_IGBINARY_VERSION_PHP85="8f8b7175c7859f1845bcdee6f7d0baeea7d07cb8"
49+
EXT_IGBINARY_VERSION_PHP85="3.2.17RC1"
5250

5351
function write_out {
5452
echo "[$1] $2"
@@ -320,8 +318,6 @@ PHP_VERSION_ID=$(php_version_id "$PHP_VERSION")
320318
write_out "opt" "Selected PHP $PHP_VERSION ($PHP_VERSION_ID)"
321319

322320
if [ $PHP_VERSION_ID -ge 80500 ]; then
323-
EXT_PMMPTHREAD_VERSION="$EXT_PMMPTHREAD_VERSION_PHP85"
324-
EXT_XDEBUG_VERSION="$EXT_XDEBUG_VERSION_PHP85"
325321
EXT_IGBINARY_VERSION="$EXT_IGBINARY_VERSION_PHP85"
326322
fi
327323
if [ $PHP_VERSION_ID -ge 80400 ]; then
@@ -331,7 +327,7 @@ if [ "$HAVE_OPCACHE_JIT" == "yes" ]; then
331327
if [ $PHP_VERSION_ID -lt 80400 ]; then
332328
write_out "WARNING" "JIT in versions below PHP 8.4 is highly unstable and not recommended"
333329
else
334-
write_out "WARNING" "JIT in PHP 8.4 has not been tested, use it with caution"
330+
write_out "WARNING" "JIT in PHP 8.4+ may be unstable, use it with caution"
335331
fi
336332
else
337333
write_out "INFO" "JIT support in OPcache won't be compiled"
@@ -502,6 +498,7 @@ else
502498
exit 1
503499
elif [ -z "$CFLAGS" ]; then
504500
if [ `getconf LONG_BIT` == "64" ]; then
501+
COMPILE_TARGET="linux64"
505502
write_out "INFO" "Compiling for current machine using 64-bit"
506503
if [ "$(uname -m)" != "aarch64" ]; then
507504
CFLAGS="-m64 $CFLAGS"
@@ -515,9 +512,11 @@ else
515512
fi
516513

517514
if [ "$DO_STATIC" == "yes" ]; then
518-
HAVE_OPCACHE="no" #doesn't work on static builds
519-
HAVE_OPCACHE_JIT="no"
520-
write_out "warning" "OPcache cannot be used on static builds; this may have a negative effect on performance"
515+
if [ "$PHP_VERSION_ID" -lt 80500 ]; then
516+
HAVE_OPCACHE="no"
517+
HAVE_OPCACHE_JIT="no"
518+
write_out "warning" "OPcache cannot be used on static builds prior to PHP 8.5; this may have a negative effect on performance"
519+
fi
521520
if [ "$FSANITIZE_OPTIONS" != "" ]; then
522521
write_out "warning" "Sanitizers cannot be used on static builds"
523522
fi
@@ -926,7 +925,7 @@ function build_gmp {
926925
download_from_mirror "gmp-$GMP_VERSION.tar.xz" "gmp" | tar -Jx >> "$DIR/install.log" 2>&1
927926
write_configure
928927
cd "$gmp_dir"
929-
RANLIB=$RANLIB ./configure --prefix="$INSTALL_DIR" \
928+
CFLAGS="-std=gnu17 $CFLAGS" RANLIB=$RANLIB ./configure --prefix="$INSTALL_DIR" \
930929
$EXTRA_FLAGS \
931930
--disable-posix-threads \
932931
--enable-static \
@@ -1473,7 +1472,32 @@ get_github_extension "rdkafka" "$EXT_RDKAFKA_VERSION" "arnaud-lb" "php-rdkafka"
14731472

14741473
get_github_extension "zstd" "$EXT_ZSTD_VERSION" "kjdev" "php-ext-zstd"
14751474

1476-
if [ "$(uname -s)" == "Darwin" ]; then
1475+
cafile=""
1476+
if [[ "$COMPILE_TARGET" == "mac"* ]]; then
1477+
cafile="/etc/ssl/cert.pem"
1478+
elif [[ "$COMPILE_TARGET" == "linux"* ]] && [[ "$IS_CROSSCOMPILE" != "yes" ]]; then
1479+
#try to detect the correct location from the current system
1480+
for file in \
1481+
"$SSL_CERT_FILE" \
1482+
"/etc/ssl/certs/ca-certificates.crt" \
1483+
"/etc/pki/tls/certs/ca-bundle-crt" \
1484+
"/etc/ssl/cert.pem";
1485+
do
1486+
if [ -f "$file" ]; then
1487+
cafile="$file"
1488+
break
1489+
fi
1490+
done
1491+
else
1492+
echo "wtf $COMPILE_TARGET"
1493+
fi
1494+
if [ -z "$cafile" ]; then
1495+
write_out "WARNING" "Don't know where to find SSL CA bundle for this target; PHP code won't be able to safely access https:// links unless openssl.cafile is configured to the correct path in php.ini"
1496+
else
1497+
write_out "INFO" "System SSL CA bundle detected as $cafile; if this is not correct, please adjust openssl.cafile in php.ini"
1498+
fi
1499+
1500+
if [[ "$COMPILE_TARGET" == "mac"* ]]; then
14771501
echo "[rdkafka] Implementing quick patch for MacOS support."
14781502

14791503
rm $BUILD_DIR/php/ext/rdkafka/config.m4 2>&1
@@ -1781,6 +1805,9 @@ echo "display_errors=1" >> "$INSTALL_DIR/bin/php.ini"
17811805
echo "display_startup_errors=1" >> "$INSTALL_DIR/bin/php.ini"
17821806
echo "recursionguard.enabled=0 ;disabled due to minor performance impact, only enable this if you need it for debugging" >> "$INSTALL_DIR/bin/php.ini"
17831807
echo "extension_dir=./$INSTALL_DIR/lib/php/extensions/no-debug-zts-20230831" >> "$INSTALL_DIR/bin/php.ini"
1808+
if [ -n "$cafile" ]; then
1809+
echo "openssl.cafile=$cafile" >> "$INSTALL_DIR/bin/php.ini"
1810+
fi
17841811

17851812
if [ "$HAVE_OPCACHE" == "yes" ]; then
17861813
if [ "$PHP_VERSION_ID" -lt 80500 ]; then

windows-compile-vs.ps1

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
$ErrorActionPreference="Stop"
22
$ProgressPreference="SilentlyContinue"
33

4-
$PHP_VERSIONS=@("8.1.33", "8.2.29", "8.3.28", "8.4.15", "8.5.0")
4+
$PHP_VERSIONS=@("8.1.34", "8.2.30", "8.3.29", "8.4.16", "8.5.0")
55

66
$PHP_SDK_VER="2.4.0"
77
$ARCH="x64"
@@ -18,8 +18,8 @@ $LIBZSTD_VER="1.5.7"
1818
$LIBGRPC_VER="1.76.0"
1919
$LIBSNAPPY_VER="1.2.2"
2020

21-
$PHP_PMMPTHREAD_VER="6.2.0"
22-
$PHP_YAML_VER="2.2.5"
21+
$PHP_PMMPTHREAD_VER="6.3.0"
22+
$PHP_YAML_VER="2.3.0"
2323
$PHP_CHUNKUTILS2_VER="0.3.5"
2424
$PHP_IGBINARY_VER="3.2.16"
2525
$PHP_LEVELDB_VER="88071eb1b1eae96af043229104b9d813f7cbe40c" #release not tagged
@@ -29,17 +29,15 @@ $PHP_RECURSIONGUARD_VER="0.1.0"
2929
$PHP_MORTON_VER="0.1.2"
3030
$PHP_LIBDEFLATE_VER="0.2.1"
3131
$PHP_XXHASH_VER="0.2.0"
32-
$PHP_XDEBUG_VER="3.4.7"
32+
$PHP_XDEBUG_VER="3.5.0"
3333
$PHP_ARRAYDEBUG_VER="0.2.1"
3434
$PHP_ENCODING_VER="1.0.0"
3535
$PHP_VANILLAGENERATOR_VER="2.1.7"
3636
$PHP_LIBKAFKA_VER="6.0.4"
3737
$PHP_ZSTD_VER="0.15.2"
3838
$PHP_GRPC_VER="1.76.0"
3939

40-
$PHP_PMMPTHREAD_VER_PHP85="4aa34a27feaa43adba5f1e93939828d1d7afdefc"
41-
$PHP_IGBINARY_VER_PHP85="8f8b7175c7859f1845bcdee6f7d0baeea7d07cb8"
42-
$PHP_XDEBUG_VER_PHP85="b8bc9425390ca7745abdc715a359d2f369c1a07b" #needs https://github.com/xdebug/xdebug/pull/1040 because of glob changes
40+
$PHP_IGBINARY_VER_PHP85="3.2.17RC1"
4341

4442
function pm-echo {
4543
param ([string] $message)
@@ -214,9 +212,7 @@ if ($PHP_VERSION_ID -ge 80400) {
214212
pm-echo "Selected PHP $PHP_VER ($PHP_VERSION_ID), SDK target $VC_VER ($SDK_TOOLSET_FLAG), CMake target $CMAKE_TARGET ($CMAKE_TOOLSET_FLAG)"
215213

216214
if ($PHP_VERSION_ID -ge 80500) {
217-
$PHP_PMMPTHREAD_VER=$PHP_PMMPTHREAD_VER_PHP85
218215
$PHP_IGBINARY_VER=$PHP_IGBINARY_VER_PHP85
219-
$PHP_XDEBUG_VER=$PHP_XDEBUG_VER_PHP85
220216
}
221217
$PHP_JIT_ENABLE_ARG="no"
222218
if ($PHP_VERSION_ID -ge 80400 -or $env:PHP_JIT_SUPPORT -eq 1) {

0 commit comments

Comments
 (0)