Skip to content

Commit 8cad6b9

Browse files
committed
cygwin enable build php 8.4
1 parent ffae911 commit 8cad6b9

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

.github/workflows/windows-cygwin.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- "8.2.25"
1818
- "8.1.30"
1919
- "8.3.13"
20-
# - "8.4.1"
20+
- "8.4.1"
2121

2222
steps:
2323
- name: Prepare git
@@ -96,7 +96,8 @@ jobs:
9696
run: |
9797
./bin/php.exe -v
9898
./bin/php.exe -m
99-
./bin/php.exe --ri pdo_pgsql
99+
./bin/php.exe --ri mongodb
100+
./bin/php.exe --ri gd
100101
./bin/php.exe --ri swoole
101102
./bin/php.exe -r "echo PHP_VERSION;"
102103

sapi/scripts/cygwin/cygwin-config-ext.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,16 @@ ROOT=${__PROJECT__}
1515

1616
PHP_VERSION='8.2.25'
1717
SWOOLE_VERSION='v5.1.5'
18+
X_PHP_VERSION='8.2'
1819

1920
while [ $# -gt 0 ]; do
2021
case "$1" in
2122
--php-version)
2223
PHP_VERSION="$2"
24+
X_PHP_VERSION=$(echo ${PHP_VERSION:0:3})
25+
if [ "$X_PHP_VERSION" = "8.4" ]; then
26+
SWOOLE_VERSION='v6.0.0-rc1'
27+
fi
2328
;;
2429
--swoole-version)
2530
SWOOLE_VERSION="$2"
@@ -77,6 +82,9 @@ if [ ! -d $ROOT/ext/imagick ]; then
7782
fi
7883
tar xvf imagick-${IMAGICK_VERSION}.tgz
7984
mv imagick-${IMAGICK_VERSION} $ROOT/ext/imagick
85+
if [ "$X_PHP_VERSION" = "8.4" ]; then
86+
sed -i.backup "s/php_strtolower(/zend_str_tolower(/" $ROOT/ext/imagick/imagick.c
87+
fi
8088
fi
8189

8290
if [ ! -f swoole-${SWOOLE_VERSION}.tgz ]; then

sapi/src/builder/extension/swoole.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
if (BUILD_CUSTOM_PHP_VERSION_ID >= 8040) {
1010
// v5.1.x 不支持 PHP 8.4
1111
// swoole 支持计划 https://wiki.swoole.com/zh-cn/#/version/supported?id=%e6%94%af%e6%8c%81%e8%ae%a1%e5%88%92
12-
$swoole_tag = 'master';
12+
$swoole_tag = 'v6.0.0-rc1';
1313
}
1414
$file = "swoole-{$swoole_tag}.tar.gz";
1515

0 commit comments

Comments
 (0)