Skip to content

Commit 9bc8420

Browse files
authored
Update version for Swoole 4.5.4 (#3662)
1 parent 7016571 commit 9bc8420

File tree

5 files changed

+59
-82
lines changed

5 files changed

+59
-82
lines changed

include/swoole_version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#define SWOOLE_MAJOR_VERSION 4
2222
#define SWOOLE_MINOR_VERSION 5
2323
#define SWOOLE_RELEASE_VERSION 4
24-
#define SWOOLE_EXTRA_VERSION "alpha"
24+
#define SWOOLE_EXTRA_VERSION ""
2525
#define SWOOLE_VERSION "4.5.4"
2626
#define SWOOLE_VERSION_ID 40504
2727
#define SWOOLE_API_VERSION_ID 0x202009a

package.xml

Lines changed: 30 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
<email>[email protected]</email>
4343
<active>yes</active>
4444
</developer>
45-
<date>2020-09-09</date>
46-
<time>20:00:00</time>
45+
<date>2020-09-15</date>
46+
<time>19:00:00</time>
4747
<version>
4848
<release>4.5.4</release>
4949
<api>4.0</api>
@@ -54,92 +54,38 @@
5454
</stability>
5555
<license uri="http://www.apache.org/licenses/LICENSE-2.0.html">Apache2.0</license>
5656
<notes>
57+
Backward compatibility Break
58+
---
59+
* Modify SWOOLE_HOOK_ALL to contain SWOOlE_HOOK_CURL (#3606) (@matyhtf)
60+
* Enable SWOOLE_HOOK_ALL by default (#3607) (@matyhtf)
61+
* Remove ssl_method and Support ssl_protocols (#3639) (@Yurunsoft)
62+
5763
New APIs
5864
---
59-
+ Added `Swoole\Process\ProcessManager` (swoole/library#88f147b) (@huanghantao)
60-
+ Added ArrayObject::append, StringObject::equals (swoole/library#f28556f) (@matyhtf)
61-
+ Added Coroutine::parallel (swoole/library#6aa89a9) (@matyhtf)
62-
+ Added Coroutine\Barrier (swoole/library#2988b2a) (@matyhtf)
65+
+ Added firstKey and lastKey (swoole/library#51) (@sy-records)
6366

6467
Enhancement
6568
---
66-
+ Added usePipelineRead to support streaming call-in http2 client (#3354) (@twose)
67-
+ Do not create the file before receive body when a download (#3381) (@twose)
68-
+ Added `bind_address` and `bind_port` setting for coroutine http client (#3390) (@huanghantao)
69-
+ Added `lowercase_header` option for HttpClient (#3399) (@matyhtf)
70-
+ Added `tcp_user_timeout` option for `Swoole\Server` (#3404) (@huanghantao)
71-
+ Added `Coroutine\Socket` event barrier (#3409) (@matyhtf)
72-
+ Added specify swString memory allocator (#3418) (@matyhtf)
73-
+ Support cURL `__toString` (swoole/library#38) (@twose)
74-
+ Added `lowercase_header` to fix cURL header name (swoole/library#e7c2a82) (@twose)
75-
+ Set wait count directly in WaitGroup constructor (swoole/library#2fb228b8) (@matyhtf)
76-
+ Added `CURLOPT_REDIR_PROTOCOLS` (swoole/library#46) (@sy-records)
77-
+ Support trailer for HTTP 1.1 (#3485) (@huanghantao)
78-
+ Support yield when sleeping less 1ms (#3487) (@Yurunsoft)
79-
+ Support get soft link file in the static handler (#3569) (@LeiZhang-Hunter)
80-
+ Close WebSocket connection immediately after the server call close method (#3570) (@matyhtf)
81-
+ Support hook stream_set_blocking (#3585) (@Yurunsoft)
82-
+ Support HTTP2 flow control in async HTTP2 Server (#3486) (@huanghantao) (@matyhtf)
83-
+ Support free socket buffer after onPackage is called (#3551) (@huanghantao) (@matyhtf)
69+
+ Added open_websocket_ping_frame, open_websocket_pong_frame (#3600) (@Yurunsoft)
8470

8571
Fixed
8672
---
87-
* Fixed WebSocket coredump, handle protocol status error (#3359) (@twose)
88-
* Fixed swSignalfd_setup and fix possible nullptr error in wait_signal (#3360) (@twose)
89-
* Fixed `Swoole\Server::close` throw a error when set dispatch_func (#3365) (@twose)
90-
* Fixed format_buffer init problem when use `Swoole\Redis\Server::format` (#3369) (@matyhtf) (@twose)
91-
* Fixed get mac address in MacOS (#3372) (@twose)
92-
* Fixed MySQL test case (#3374) (@qiqizjl)
93-
* Fixed PHP8 compatibility (#3384) (#3458) (#3578) (#3598) (@twose)
94-
* Fixed missing php_error_docref, timeout_event and return value in hook socket write and read (#3383) (@twose)
95-
* Fixed the server could not be stopped during the `WorkerStart` phase (#3382) (@huanghantao)
96-
* Fixed coredump because of heart thread operate conn->socket (#3396) (@huanghantao)
97-
* Fixed send yield logic bug (#3397) (@twose) (@matyhtf)
98-
* Fixed compile problem in Cygwin64 (#3400) (@twose)
99-
* Fixed WebSocket finish property invalid (#3410) (@matyhtf)
100-
* Fixed build error when losing sys/random.h (#3427) (@huanghantao)
101-
* Fixed missing MySQL transaction error, update the test (#3429) (@twose)
102-
* Fixed the result of `stream_select` (#3440) (@Yurunsoft)
103-
* Fixed lose `SIGCHLD` when use `Coroutine\System` to create the child process (#3446) (@huanghantao)
104-
* Fixed sendwait not support SSL mode (#3459) (@huanghantao)
105-
* Fixed `ArrayObject` and `StringObject` bug (swoole/library#44) (@matyhtf)
106-
* Fixed mysqli error, typo (swoole/library#45) (@sy-records)
107-
* Fixed can not get correct Swoole\Client::errCode if `open_eof_check` is set (#3478) (@huanghantao)
108-
* Fixed fix atomic->wait()/wakeup() in MacOS (#3476) (@Yurunsoft)
109-
* Fixed Client::connect return 0 when serve refused (#3484) (@matyhtf)
110-
* Fixed nullptr_t is not declared in alpine (#3488) (@limingxinleo)
111-
* Fixed fix HTTP Client download filename bug, double-free memory (#3489) (@Yurunsoft)
112-
* Fixed fix memory leak of Server\Port (#3507) (@twose)
113-
* Fixed fix mqtt parse protocal error (318e33a) (84d8214) (80327b3) (efe6c63) (@GXhua) (@sy-records)
114-
* Fixed Coroutine\Http\Client->getHeaderOut coredump (#3534) (@matyhtf)
115-
* Fixed missing error info of SSL verify (#3535) (@twose)
116-
* Fixed update Swoole benchmark link in README (#3536) (@sy-records) (@santalex)
117-
* Fixed fix HTTP header/cookie injection when using CRLF (#3539) (#3541) (#3545) (chromium1337) (@huanghantao)
118-
* Fixed fix the typo variable in #3463 (#3547) (chromium1337) (@huanghantao)
119-
* Fixed the typo introduced in pull request #3463 (#3547) (@deminy)
120-
* Fixed set coroutine WebSocket server frame->fd (#3549) (@huanghantao)
121-
* Fixed connection leak when heart thread check the connection status (#3534) (@matyhtf)
122-
* Fixed don't need block signals in the process pool (#3582) (@huanghantao) (@matyhtf)
123-
* Fixed don't send headers by SAPI (#3571) (@twose) (@sshymko)
124-
* Fixed set error code and error message when curl execution fails (swoole/library#1b6c65e) (@sy-records)
125-
* Fixed swoole_socket_coro accept bug when call setProtocol function will cause coredump (#3591) (@matyhtf)
73+
* Fixed fseek ftell file larger than 2G bug (#3619) (@Yurunsoft)
74+
* Fixed Socket barrier bug (#3627) (@matyhtf)
75+
* Fixed http proxy handshake bug (#3630) (@matyhtf)
76+
* Fixed a problem with parsing the HTTP header when send chunk data (#3633) (@matyhtf)
77+
* Fixed zend_hash_clean assertion failure (#3634) (@twose)
78+
* Fixed can't remove broken fd from event loop (#3650) (@matyhtf)
79+
* Fixed crash when receiving invalid packet (#3653) (@matyhtf)
80+
* Fixed array_key_last (swoole/library#46) (@sy-records)
12681

12782
Kernel
12883
---
129-
* Use the CPP style (#3349) (#3351) (#3454) (#3479) (#3490) (@huanghantao) (@matyhtf)
130-
* Added Swoole known strings to improve PHP object property reading (#3363) (@huanghantao)
131-
* Improve code (#3350) (#3356) (#3357) (#3423) (#3426) (#3461) (#3463) (#3472) (#3557) (#3583) (@huanghantao) (@twose) (@matyhtf)
132-
* Optimize tests (#3416) (#3481) (#3558) (@matyhtf)
133-
* Simplify table int type (#3407) (@matyhtf)
134-
* Added sw_memset_zero and replace bzero (#3419) (@CismonX)
135-
* Optimize log module (#3432) (@matyhtf)
136-
* Refactor libswoole (#3448) (#3473) (#3475) (#3492) (#3494) (#3497) (#3498) (#3526) (@matyhtf)
137-
* Refactor header deps (#3457) (@matyhtf) (@huanghantao)
138-
* Added `Channel::count()` and `Channel::get_bytes()` (f001581) (@matyhtf)
139-
* Added scope guard (#3504) (@huanghantao)
140-
* Added libswoole coverage test (#3431) (@huanghantao)
141-
* Added lib-swoole/ext-swoole MacOS test (#3521) (@huanghantao)
142-
* Added lib-swoole/ext-swoole Alpine test (#3537) (@limingxinleo)
84+
* Code optimization (#3615) (#3617) (#3622) (#3635) (#3640) (#3641) (#3642) (#3645) (#3658) (@matyhtf)
85+
* Reduce unnecessary memory operation to improve write performance (#3620) (@matyhtf)
86+
* Refactor aio (#3624) (@Yurunsoft)
87+
* Added readlink/opendir/readdir/closedir hook (#3628) (@matyhtf)
88+
* Improve swMutex_create, add SW_MUTEX_ROBUST (#3646) (@matyhtf)
14389
</notes>
14490
<contents>
14591
<dir name="/">
@@ -1077,6 +1023,7 @@
10771023
<file role="test" name="tests/swoole_event/defer.phpt" />
10781024
<file role="test" name="tests/swoole_event/defer_with_sleep.phpt" />
10791025
<file role="test" name="tests/swoole_event/defer_without_io.phpt" />
1026+
<file role="test" name="tests/swoole_event/del_after_close.phpt" />
10801027
<file role="test" name="tests/swoole_event/dispatch.phpt" />
10811028
<file role="test" name="tests/swoole_event/swoole_event.phpt" />
10821029
<file role="test" name="tests/swoole_event/swoole_event_del.phpt" />
@@ -1352,6 +1299,8 @@
13521299
<file role="test" name="tests/swoole_library/string_object/base.phpt" />
13531300
<file role="test" name="tests/swoole_library/wait_group/normal.phpt" />
13541301
<file role="test" name="tests/swoole_library/wait_group/timeout.phpt" />
1302+
<file role="test" name="tests/swoole_lock/mutex.phpt" />
1303+
<file role="test" name="tests/swoole_lock/mutex_robust.phpt" />
13551304
<file role="test" name="tests/swoole_mysql_coro/abandon_prepare_dtor.phpt" />
13561305
<file role="test" name="tests/swoole_mysql_coro/aborted_clients.phpt" />
13571306
<file role="test" name="tests/swoole_mysql_coro/another_coroutine.phpt" />
@@ -1628,6 +1577,7 @@
16281577
<file role="test" name="tests/swoole_server/length/01.phpt" />
16291578
<file role="test" name="tests/swoole_server/length/02.phpt" />
16301579
<file role="test" name="tests/swoole_server/length/03.phpt" />
1580+
<file role="test" name="tests/swoole_server/length/length_func.phpt" />
16311581
<file role="test" name="tests/swoole_server/listen_fail.phpt" />
16321582
<file role="test" name="tests/swoole_server/max_queued_bytes.phpt" />
16331583
<file role="test" name="tests/swoole_server/max_request.phpt" />
@@ -1637,6 +1587,7 @@
16371587
<file role="test" name="tests/swoole_server/mqtt/length_offset.phpt" />
16381588
<file role="test" name="tests/swoole_server/mqtt/recv_fail.phpt" />
16391589
<file role="test" name="tests/swoole_server/mqtt/send_big_pack.phpt" />
1590+
<file role="test" name="tests/swoole_server/new_twice.phpt" />
16401591
<file role="test" name="tests/swoole_server/object/getManagerPid.phpt" />
16411592
<file role="test" name="tests/swoole_server/object/getMasterPid.phpt" />
16421593
<file role="test" name="tests/swoole_server/object/getWorkerId.phpt" />
@@ -1681,6 +1632,7 @@
16811632
<file role="test" name="tests/swoole_server/ssl/verify_01.phpt" />
16821633
<file role="test" name="tests/swoole_server/ssl/verify_02.phpt" />
16831634
<file role="test" name="tests/swoole_server/ssl/verify_03.phpt" />
1635+
<file role="test" name="tests/swoole_server/start_twice.phpt" />
16841636
<file role="test" name="tests/swoole_server/stats.phpt" />
16851637
<file role="test" name="tests/swoole_server/stop.phpt" />
16861638
<file role="test" name="tests/swoole_server/stop_in_workerStart.phpt" />
@@ -1691,6 +1643,7 @@
16911643
<file role="test" name="tests/swoole_server/task/finish_timeout.phpt" />
16921644
<file role="test" name="tests/swoole_server/task/huge_data.phpt" />
16931645
<file role="test" name="tests/swoole_server/task/idle_worekr_num.phpt" />
1646+
<file role="test" name="tests/swoole_server/task/invalid_packet.phpt" />
16941647
<file role="test" name="tests/swoole_server/task/kill_01.phpt" />
16951648
<file role="test" name="tests/swoole_server/task/kill_02.phpt" />
16961649
<file role="test" name="tests/swoole_server/task/kill_task_worker_02.phpt" />

php_swoole.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,7 @@ PHP_MINIT_FUNCTION(swoole) {
495495
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_DNSLOOKUP_RESOLVE_TIMEOUT", SW_ERROR_DNSLOOKUP_RESOLVE_TIMEOUT);
496496
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_BAD_IPV6_ADDRESS", SW_ERROR_BAD_IPV6_ADDRESS);
497497
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_UNREGISTERED_SIGNAL", SW_ERROR_UNREGISTERED_SIGNAL);
498+
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_EVENT_SOCKET_REMOVED", SW_ERROR_EVENT_SOCKET_REMOVED);
498499
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_SESSION_CLOSED_BY_SERVER", SW_ERROR_SESSION_CLOSED_BY_SERVER);
499500
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_SESSION_CLOSED_BY_CLIENT", SW_ERROR_SESSION_CLOSED_BY_CLIENT);
500501
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_SESSION_CLOSING", SW_ERROR_SESSION_CLOSING);

php_swoole_library.h

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Generated by build-library.php, Please DO NOT modify!
33
*/
44

5-
/* $Id: 970b5d27379daef268dc53bb8ae9307202c7cfcf */
5+
/* $Id: 5e79b08ea46791d29eded3de53440143eab539b9 */
66

77
static const char* swoole_library_source_constants =
88
"\n"
@@ -173,8 +173,6 @@ static const char* swoole_library_source_core_constant =
173173
"\n"
174174
" public const OPTION_ENABLE_COROUTINE = 'enable_coroutine';\n"
175175
"\n"
176-
" public const OPTION_SSL_METHOD = 'ssl_method';\n"
177-
"\n"
178176
" public const OPTION_SSL_PROTOCOLS = 'ssl_protocols';\n"
179177
"\n"
180178
" public const OPTION_SSL_COMPRESS = 'ssl_compress';\n"
@@ -431,6 +429,10 @@ static const char* swoole_library_source_core_constant =
431429
"\n"
432430
" public const OPTION_OPEN_WEBSOCKET_CLOSE_FRAME = 'open_websocket_close_frame';\n"
433431
"\n"
432+
" public const OPTION_OPEN_WEBSOCKET_PING_FRAME = 'open_websocket_ping_frame';\n"
433+
"\n"
434+
" public const OPTION_OPEN_WEBSOCKET_PONG_FRAME = 'open_websocket_pong_frame';\n"
435+
"\n"
434436
" public const OPTION_OPEN_HTTP2_PROTOCOL = 'open_http2_protocol';\n"
435437
"\n"
436438
" public const OPTION_OPEN_REDIS_PROTOCOL = 'open_redis_protocol';\n"
@@ -874,6 +876,22 @@ static const char* swoole_library_source_core_array_object =
874876
" }\n"
875877
"\n"
876878
" /**\n"
879+
" * @return null|int|string\n"
880+
" */\n"
881+
" public function firstKey()\n"
882+
" {\n"
883+
" return array_key_first($this->array);\n"
884+
" }\n"
885+
"\n"
886+
" /**\n"
887+
" * @return null|int|string\n"
888+
" */\n"
889+
" public function lastKey()\n"
890+
" {\n"
891+
" return array_key_last($this->array);\n"
892+
" }\n"
893+
"\n"
894+
" /**\n"
877895
" * @return mixed\n"
878896
" */\n"
879897
" public function first()\n"
@@ -6646,7 +6664,10 @@ static const char* swoole_library_source_functions =
66466664
"if (!function_exists('array_key_last')) {\n"
66476665
" function array_key_last(array $array)\n"
66486666
" {\n"
6649-
" return key(array_slice($array, -1));\n"
6667+
" if (!empty($array)) {\n"
6668+
" return key(array_slice($array, -1, 1, true));\n"
6669+
" }\n"
6670+
" return null;\n"
66506671
" }\n"
66516672
"}\n"
66526673
"\n"

src/core/error.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ const char *swoole_strerror(int code) {
7272
return "Bad ipv6 address";
7373
case SW_ERROR_UNREGISTERED_SIGNAL:
7474
return "Unregistered signal";
75+
case SW_ERROR_EVENT_SOCKET_REMOVED:
76+
return "Event socket removed";
7577
case SW_ERROR_SESSION_CLOSED_BY_SERVER:
7678
return "Session closed by server";
7779
case SW_ERROR_SESSION_CLOSED_BY_CLIENT:

0 commit comments

Comments
 (0)