Skip to content

Commit 1b674d6

Browse files
committed
Merge branch 'build_native_php' into php-fpm
2 parents dbc957f + 54c6d58 commit 1b674d6

39 files changed

+1256
-978
lines changed

.gdbinit

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ define print_cvs
4242

4343
printf "Compiled variables count: %d\n\n", $cv_count
4444
while $cv_idx < $cv_count
45-
printf "[%d] '%s'\n", $cv_idx, $cv[$cv_idx].val
45+
printf "[%d] '$%s'\n", $cv_idx, $cv[$cv_idx].val@$cv[$cv_idx].len
4646
set $zvalue = ((zval *) $cv_ex_ptr) + $callFrameSize + $cv_idx
4747
printzv $zvalue
4848
set $cv_idx = $cv_idx + 1
@@ -66,18 +66,18 @@ define dump_bt
6666
if $func
6767
if $ex->This->value.obj
6868
if $func->common.scope
69-
printf "%s->", $func->common.scope->name->val
69+
printf "%s->", (char*)$func->common.scope->name->val
7070
else
71-
printf "%s->", $ex->This->value.obj->ce.name->val
71+
printf "%s->", (char*)$ex->This->value.obj->ce.name->val
7272
end
7373
else
7474
if $func->common.scope
75-
printf "%s::", $func->common.scope->name->val
75+
printf "%s::", (char*)$func->common.scope->name->val
7676
end
7777
end
7878

7979
if $func->common.function_name
80-
printf "%s(", $func->common.function_name->val
80+
printf "%s(", (char*)$func->common.function_name->val
8181
else
8282
printf "(main"
8383
end
@@ -109,7 +109,7 @@ define dump_bt
109109
printf "%f", $zvalue->value.dval
110110
end
111111
if $type == 6
112-
____print_str $zvalue->value.str->val $zvalue->value.str->len
112+
____print_str (char*)$zvalue->value.str->val $zvalue->value.str->len
113113
end
114114
if $type == 7
115115
printf "array(%d)[%p]", $zvalue->value.arr->nNumOfElements, $zvalue
@@ -135,7 +135,7 @@ define dump_bt
135135
end
136136
if $func != 0
137137
if $func->type == 2
138-
printf "%s:%d ", $func->op_array.filename->val, $ex->opline->lineno
138+
printf "%s:%d ", (char*)$func->op_array.filename->val, $ex->opline->lineno
139139
else
140140
printf "[internal function]"
141141
end
@@ -186,7 +186,7 @@ define ____printzv_contents
186186
printf "double: %f", $zvalue->value.dval
187187
end
188188
if $type == 6
189-
printf "string: %s", $zvalue->value.str->val
189+
printf "string: %s", (char*)$zvalue->value.str->val
190190
end
191191
if $type == 7
192192
printf "array: "
@@ -208,7 +208,7 @@ define ____printzv_contents
208208
set $handle = $zvalue->value.obj.handle
209209
set $handlers = $zvalue->value.obj.handlers
210210
set $zobj = $zvalue->value.obj
211-
set $cname = $zobj->ce->name->val
211+
set $cname = (char*)$zobj->ce->name->val
212212
printf "(%s) #%d", $cname, $handle
213213
if ! $arg1
214214
if $handlers->get_properties == &zend_std_get_properties
@@ -233,7 +233,7 @@ define ____printzv_contents
233233
set $name = $p->key
234234
set $prop = (zend_property_info*)$p->val.value.ptr
235235
set $val = (zval*)((char*)$zobj + $prop->offset)
236-
printf "%s => ", $name->val
236+
printf "%s => ", (char*)$name->val
237237
printzv $val
238238
set $k = $k + 1
239239
end
@@ -318,7 +318,8 @@ define ____print_ht
318318
set $n = $n - 1
319319
end
320320

321-
if $ht->u.v.flags & 4
321+
set $packed = $ht->u.v.flags & 4
322+
if $packed
322323
printf "Packed"
323324
else
324325
printf "Hash"
@@ -329,36 +330,45 @@ define ____print_ht
329330
set $i = 0
330331
set $ind = $ind + 1
331332
while $i < $num
332-
set $p = (Bucket*)($ht->arData + $i)
333+
if $packed
334+
set $val = (zval*)($ht->arPacked + $i)
335+
set $key = (zend_string*)0
336+
set $h = $i
337+
else
338+
set $bucket = (Bucket*)($ht->arData + $i)
339+
set $val = &$bucket->val
340+
set $key = $bucket->key
341+
set $h = $bucket->h
342+
end
333343
set $n = $ind
334-
if $p->val.u1.v.type > 0
344+
if $val->u1.v.type > 0
335345
while $n > 0
336346
printf " "
337347
set $n = $n - 1
338348
end
339349
printf "[%d] ", $i
340-
if $p->key
341-
____print_str $p->key->val $p->key->len
350+
if $key
351+
____print_str (char*)$key->val $key->len
342352
printf " => "
343353
else
344-
printf "%d => ", $p->h
354+
printf "%d => ", $h
345355
end
346356
if $arg1 == 0
347-
printf "%p\n", (zval *)&$p->val
357+
printf "%p\n", $val
348358
end
349359
if $arg1 == 1
350-
set $zval = (zval *)&$p->val
360+
set $zval = $val
351361
____printzv $zval 1
352362
end
353363
if $arg1 == 2
354-
printf "%s\n", (char*)$p->val.value.ptr
364+
printf "%s\n", (char*)$val->value.ptr
355365
end
356366
if $arg1 == 3
357-
set $func = (zend_function*)$p->val.value.ptr
358-
printf "\"%s\"\n", $func->common.function_name->val
367+
set $func = (zend_function*)$val->value.ptr
368+
printf "\"%s\"\n", (char*)$func->common.function_name->val
359369
end
360370
if $arg1 == 4
361-
set $const = (zend_constant *)$p->val.value.ptr
371+
set $const = (zend_constant *)$val->value.ptr
362372
____printzv $const 1
363373
end
364374
end
@@ -413,15 +423,15 @@ define ____print_inh_class
413423
printf "final "
414424
end
415425
end
416-
printf "class %s", $ce->name->val
426+
printf "class %s", (char*)$ce->name->val
417427
if $ce->parent != 0
418-
printf " extends %s", $ce->parent->name->val
428+
printf " extends %s", (char*)$ce->parent->name->val
419429
end
420430
if $ce->num_interfaces != 0
421431
printf " implements"
422432
set $tmp = 0
423433
while $tmp < $ce->num_interfaces
424-
printf " %s", $ce->interfaces[$tmp]->name->val
434+
printf " %s", (char*)$ce->interfaces[$tmp]->name->val
425435
set $tmp = $tmp + 1
426436
if $tmp < $ce->num_interfaces
427437
printf ","
@@ -433,10 +443,10 @@ end
433443

434444
define ____print_inh_iface
435445
set $ce = $arg0
436-
printf "interface %s", $ce->name->val
446+
printf "interface %s", (char*)$ce->name->val
437447
if $ce->num_interfaces != 0
438448
set $ce = $ce->interfaces[0]
439-
printf " extends %s", $ce->name->val
449+
printf " extends %s", (char*)$ce->name->val
440450
else
441451
set $ce = 0
442452
end
@@ -472,11 +482,11 @@ end
472482

473483
define print_pi
474484
set $pi = (zend_property_info *)$arg0
475-
set $initial_offset = ((uint32_t)(zend_uintptr_t)(&((zend_object*)0)->properties_table[(0)]))
485+
set $initial_offset = ((uint32_t)(uintptr_t)(&((zend_object*)0)->properties_table[(0)]))
476486
set $ptr_to_val = (zval*)((char*)$pi->ce->default_properties_table + $pi->offset - $initial_offset)
477487
printf "[%p] {\n", $pi
478488
printf " offset = %p\n", $pi->offset
479-
printf " ce = [%p] %s\n", $pi->ce, $pi->ce->name->val
489+
printf " ce = [%p] %s\n", $pi->ce, (char*)$pi->ce->name->val
480490
printf " flags = 0x%x (", $pi->flags
481491
if $pi->flags & 0x100
482492
printf "ZEND_ACC_PUBLIC"
@@ -598,7 +608,7 @@ define print_zstr
598608
set $maxlen = $zstr->len
599609
end
600610
printf "string(%d) ", $zstr->len
601-
____print_str $zstr->val $zstr->len $maxlen
611+
____print_str (char*)$zstr->val $zstr->len $maxlen
602612
printf "\n"
603613
end
604614

.github/workflows/macos-aarch64.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ env:
77

88
jobs:
99
macos-aarch64:
10-
if: 1
11-
runs-on: macos-14
10+
runs-on: macos-15
1211
# macos-latest (macos-14) 变更了 CPU 架构,由 x86_64 变更为 arm64
1312
# macos-14 CPU 架构 arm64
1413
# macos-13 CPU 架构 x86_64

.github/workflows/macos-x86_64.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ env:
1010
jobs:
1111
macos-x86_64:
1212
if: 1
13-
runs-on: macos-13
13+
runs-on: macos-15-intel
1414
# macos-latest (macos-14) 变更了 CPU 架构,由 x86_64 变更为 arm64
1515
# macos-14 CPU 架构 arm64
1616
# macos-13 CPU 架构 x86_64

.github/workflows/windows-cygwin.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,6 @@ jobs:
4747
run: |
4848
echo "BUILD_PHP_VERSION=${{ matrix.php-version }}" >> $GITHUB_ENV
4949
50-
- name: Cache cygwin packages
51-
id: cache-cygwin
52-
uses: actions/cache@v4
53-
env:
54-
cache-name: cache-cygwin-packages
55-
with:
56-
path: C:\cygwin-packages
57-
key: "${{ runner.os }}-build-${{ env.cache-name }}"
58-
5950
- name: Cache pool
6051
id: cache-cygwin-pool
6152
uses: actions/cache@v4

.github/workflows/windows-msys2.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
matrix:
1616
php-version:
1717
- "8.2.29"
18-
- "8.1.33"
18+
# - "8.1.33"
1919
- "8.3.23"
2020
- "8.4.10"
2121
steps:
@@ -41,15 +41,6 @@ jobs:
4141
git config --global --add safe.directory ${{ github.workspace }}
4242
4343
- uses: actions/checkout@v4
44-
- name: Cache msys2 packages
45-
id: cache-msys2
46-
uses: actions/cache@v4
47-
env:
48-
cache-name: cache-msys2-packages
49-
with:
50-
path: C:\msys2-packages
51-
key: "${{ runner.os }}-build-${{ env.cache-name }}"
52-
5344
- name: Cache pool
5445
id: cache-msys2-pool
5546
uses: actions/cache@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ tmp-php.ini
311311
/ext/inotify
312312
/ext/swoole_tracker_agent
313313
/ext/loader8
314+
/ext/swoole
314315
/ext/ds
315316
/ext/xlswriter
316317
/ext/uuid

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ curl -fSL https://github.com/swoole/build-static-php/blob/main/setup-php-cli-run
5555
- [php-fpm 构建选项文档](docs/options.md)
5656
- [php-fpm 搭建依赖库镜像服务](sapi/download-box/README.md)
5757
- [quickstart](sapi/quickstart/README.md)
58+
- [常见问题解答](https://github.com/swoole/swoole-cli/blob/main/docs/FAQ.md)
5859

5960
## Clone
6061

docs/ChangeLog.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# [v6.1.0.0-rc1](https://github.com/swoole/swoole-cli/releases/tag/v6.1.0.0-rc1)
2+
3+
| item | value |
4+
|----------------|--------------|
5+
| branch | main |
6+
| tag | v6.1.0.0-rc1 |
7+
| swoole version | v6.1.0-rc1 |
8+
| php version | 8.1.29 |
9+
| release date | 2025-08-31 |
10+
| status | ok |
11+
12+
## [change info](https://github.com/swoole/swoole-cli/compare/v6.0.2.0...v6.1.0.0-rc1)
13+
14+
1. swoole version v6.0.2.0 upgrade to
15+
v6.1.0.0-rc1 , [swoole v6.1.0-rc1 info](https://github.com/swoole/swoole-src/releases/tag/v6.1.0-rc1)
16+
17+
# [v5.1.8.0](https://github.com/swoole/swoole-cli/releases/tag/v5.1.8.0)
18+
19+
| item | value |
20+
|----------------|------------|
21+
| branch | v5.1.x |
22+
| tag | v5.1.8.0 |
23+
| swoole version | v5.1.8 |
24+
| php version | 8.1.29 |
25+
| release date | 2025-08-23 |
26+
| status | ok |
27+
28+
## [change info](https://github.com/swoole/swoole-cli/compare/v5.1.7.0...v5.1.8.0)
29+
30+
1. swoole version v5.1.7 upgrade to
31+
v5.1.8 , [swoole v5.1.8 info](https://github.com/swoole/swoole-src/releases/tag/v5.1.8)
32+
33+
34+

docs/FAQ.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## download swoole-cli
2+
3+
```shell
4+
5+
curl -fSL https://github.com/swoole/swoole-cli/blob/main/setup-swoole-cli-runtime.sh?raw=true | bash -s -- --version v5.1.8.0
6+
7+
# from https://www.swoole.com/download
8+
curl -fSL https://github.com/swoole/swoole-cli/blob/main/setup-swoole-cli-runtime.sh?raw=true | bash -s -- --version v5.1.8.0 --mirror china
9+
10+
```
11+
12+
## 备注: macos环境下 首次运行提示无权限 ,解决方法
13+
14+
note : macos clearing the com.apple.quarantine extended attribute
15+
16+
```
17+
xattr ./runtime/swoole-cli/swoole-cli
18+
19+
sudo xattr -rd com.apple.quarantine ./runtime/swoole-cli/swoole-cli
20+
21+
```
22+

docs/diff.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
Added(6)
2-
===============================================================
3-
+ ds
1+
2+
# Extensions
3+
4+
## added(6)
45
+ imagick
56
+ mongodb
67
+ redis
78
+ swoole
89
+ yaml
910

10-
Removed(26)
11-
==============================================================
11+
## Removed(26)
1212
- calendar
1313
- com_dotnet
1414
- dba
@@ -36,3 +36,13 @@ Removed(26)
3636
- sysvshm
3737
- tidy
3838

39+
# SAPI
40+
Only CLI SAPI(`sapi/cli`) is available. FPM module(`sapi/fpm`) and cli are merged into one(`sapi/cli/fpm`).
41+
42+
## List of files maintained by us
43+
- Makefile.frag
44+
- config.m4
45+
- php_cli.c
46+
- php_cli_server.h
47+
- php_cli_server.c
48+

0 commit comments

Comments
 (0)