Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/4.8.x' into 4.8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
matyhtf committed Nov 30, 2021
2 parents c195ff5 + 6de2f05 commit ba72231
Show file tree
Hide file tree
Showing 50 changed files with 154 additions and 64 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PROJECT(libswoole)

ENABLE_LANGUAGE(ASM)
set(SWOOLE_VERSION 4.8.2)
set(SWOOLE_VERSION 4.8.3)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -g")
Expand Down
8 changes: 1 addition & 7 deletions ext-src/php_swoole_library.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/

/* $Id: 471e0a545312f42c2cfc3004e66d1ff3656bc9bf */
/* $Id: acfe73e33caae4c5d12da7456a261b64b191f588 */

static const char* swoole_library_source_constants =
"\n"
Expand Down Expand Up @@ -295,8 +295,6 @@ static const char* swoole_library_source_core_constant =
"\n"
" public const OPTION_STACK_SIZE = 'stack_size';\n"
"\n"
" public const OPTION_NAME_RESOLVER = 'name_resolver';\n"
"\n"
" public const OPTION_DNS_CACHE_EXPIRE = 'dns_cache_expire';\n"
"\n"
" public const OPTION_DNS_CACHE_CAPACITY = 'dns_cache_capacity';\n"
Expand All @@ -305,8 +303,6 @@ static const char* swoole_library_source_core_constant =
"\n"
" public const OPTION_RECONNECT = 'reconnect';\n"
"\n"
" public const OPTION_MAX_RETRIES = 'max_retries';\n"
"\n"
" public const OPTION_DEFER = 'defer';\n"
"\n"
" public const OPTION_LOWERCASE_HEADER = 'lowercase_header';\n"
Expand Down Expand Up @@ -375,8 +371,6 @@ static const char* swoole_library_source_core_constant =
"\n"
" public const OPTION_MAX_QUEUED_BYTES = 'max_queued_bytes';\n"
"\n"
" public const OPTION_WORKER_MAX_CONCURRENCY = 'worker_max_concurrency';\n"
"\n"
" public const OPTION_SEND_TIMEOUT = 'send_timeout';\n"
"\n"
" public const OPTION_DISPATCH_MODE = 'dispatch_mode';\n"
Expand Down
6 changes: 3 additions & 3 deletions include/swoole_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@

#define SWOOLE_MAJOR_VERSION 4
#define SWOOLE_MINOR_VERSION 8
#define SWOOLE_RELEASE_VERSION 2
#define SWOOLE_RELEASE_VERSION 3
#define SWOOLE_EXTRA_VERSION ""
#define SWOOLE_VERSION "4.8.2"
#define SWOOLE_VERSION_ID 40802
#define SWOOLE_VERSION "4.8.3"
#define SWOOLE_VERSION_ID 40803
#define SWOOLE_API_VERSION_ID 0x202109a

#define SWOOLE_BUG_REPORT \
Expand Down
60 changes: 56 additions & 4 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@
<email>doubaokun@php.net</email>
<active>yes</active>
</developer>
<date>2021-11-17</date>
<time>13:00:00</time>
<date>2021-11-29</date>
<time>11:00:00</time>
<version>
<release>4.8.2</release>
<release>4.8.3</release>
<api>4.0</api>
</version>
<stability>
Expand Down Expand Up @@ -529,6 +529,8 @@
<file role="src" name="ext-src/swoole_coroutine_system.cc" />
<file role="src" name="ext-src/swoole_curl.cc" />
<file role="src" name="ext-src/swoole_event.cc" />
<file role="src" name="ext-src/swoole_hook_sockets.stub.php" />
<file role="src" name="ext-src/swoole_hook_sockets_arginfo.h" />
<file role="src" name="ext-src/swoole_http2_client_coro.cc" />
<file role="src" name="ext-src/swoole_http2_server.cc" />
<file role="src" name="ext-src/swoole_http_client_coro.cc" />
Expand Down Expand Up @@ -731,7 +733,6 @@
<file role="test" name="tests/include/config.php" />
<file role="test" name="tests/include/functions.php" />
<file role="test" name="tests/include/lib/composer.json" />
<file role="test" name="tests/include/lib/composer.lock" />
<file role="test" name="tests/include/lib/src/Assert.php" />
<file role="test" name="tests/include/lib/src/CoServer.php" />
<file role="test" name="tests/include/lib/src/CurlManager.php" />
Expand Down Expand Up @@ -777,6 +778,7 @@
<file role="test" name="tests/include/ssl_certs/sni_server_us_key.pem" />
<file role="test" name="tests/init" />
<file role="test" name="tests/new" />
<file role="test" name="tests/php-cs-fixer" />
<file role="test" name="tests/run-tests" />
<file role="test" name="tests/start.sh" />
<file role="test" name="tests/swoole_atomic/atomic.phpt" />
Expand Down Expand Up @@ -1087,6 +1089,7 @@
<file role="test" name="tests/swoole_curl/close_before_resume.phpt" />
<file role="test" name="tests/swoole_curl/concurrent.phpt" />
<file role="test" name="tests/swoole_curl/error.phpt" />
<file role="test" name="tests/swoole_curl/event_exit.phpt" />
<file role="test" name="tests/swoole_curl/exec_twice.phpt" />
<file role="test" name="tests/swoole_curl/guzzle.phpt" />
<file role="test" name="tests/swoole_curl/guzzle/cancel.phpt" />
Expand Down Expand Up @@ -1139,6 +1142,7 @@
<file role="test" name="tests/swoole_curl/setopt/nobody.phpt" />
<file role="test" name="tests/swoole_curl/sleep.phpt" />
<file role="test" name="tests/swoole_curl/ssl/version.phpt" />
<file role="test" name="tests/swoole_curl/symfony-noco.phpt" />
<file role="test" name="tests/swoole_curl/symfony.phpt" />
<file role="test" name="tests/swoole_curl/template" />
<file role="test" name="tests/swoole_curl/timer_coredump.phpt" />
Expand Down Expand Up @@ -1641,6 +1645,54 @@
<file role="test" name="tests/swoole_runtime/set_hook_flags.phpt" />
<file role="test" name="tests/swoole_runtime/sleep.phpt" />
<file role="test" name="tests/swoole_runtime/sleep_yield.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/bug46360.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/bug49341.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/bug63000.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/bug76839.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/ipv4loop.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/ipv6_skipif.inc" />
<file role="test" name="tests/swoole_runtime/sockets/basic/ipv6loop.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/mcast_helpers.php.inc" />
<file role="test" name="tests/swoole_runtime/sockets/basic/mcast_ipv4_recv.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/mcast_ipv4_send.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/mcast_ipv4_send_error.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/mcast_ipv6_recv.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/mcast_ipv6_recv_limited.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/mcast_ipv6_send.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_accept_failure.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_bind.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_clear_error.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_connect_params.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_create_listen-nobind.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_create_listen.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_create_listen_used.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_create_pair.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_getopt.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_getpeername.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_getpeername_ipv4loop.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_getpeername_ipv6loop.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_getsockname.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_listen-wrongparams.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_read_params.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_select-wrongparams-2.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_select.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_select_error.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_sentto_recvfrom_ipv4_udp.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_sentto_recvfrom_ipv6_udp.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_sentto_recvfrom_unix.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_set_block-retval.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_set_nonblock-retval.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_set_nonblock.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_set_option_bindtodevice.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_set_option_error_socket_option.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_set_option_in6_pktinfo.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_set_option_rcvtimeo.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_set_option_seolinger.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_set_option_sndtimeo.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_setopt_basic.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_shutdown.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/socket_strerror.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/basic/unixloop.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/error.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/get_name.phpt" />
<file role="test" name="tests/swoole_runtime/sockets/nonblock.phpt" />
Expand Down
3 changes: 2 additions & 1 deletion tests/swoole_runtime/sockets/basic/bug46360.phpt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
--TEST--
Bug 46360 - TCP_NODELAY constant (sock_get_option, sock_set_option)
swoole_runtime/sockets/basic: Bug 46360 - TCP_NODELAY constant (sock_get_option, sock_set_option)
--SKIPIF--
<?php require __DIR__ . '/../../../include/skipif.inc'; ?>
<?php if (!extension_loaded('sockets')) die('skip sockets extension not loaded'); ?>
--CREDITS--
Florian Anderiasch
Expand Down
3 changes: 2 additions & 1 deletion tests/swoole_runtime/sockets/basic/bug49341.phpt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
--TEST--
Bug #49341: add SO_REUSEPORT support for socket_set_option()
swoole_runtime/sockets/basic: add SO_REUSEPORT support for socket_set_option()
--SKIPIF--
<?php require __DIR__ . '/../../../include/skipif.inc'; ?>
<?php
if (!extension_loaded('sockets')) {
die('skip sockets extension not available.');
Expand Down
3 changes: 2 additions & 1 deletion tests/swoole_runtime/sockets/basic/bug63000.phpt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
--TEST--
Bug #63000: Multicast on OSX
swoole_runtime/sockets/basic: Multicast on OSX
--SKIPIF--
<?php require __DIR__ . '/../../../include/skipif.inc'; ?>
<?php
if (!extension_loaded('sockets')) {
die('skip sockets extension not available.');
Expand Down
3 changes: 2 additions & 1 deletion tests/swoole_runtime/sockets/basic/bug76839.phpt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
--TEST--
Bug #76839: socket_recvfrom may return an invalid 'from' address on MacOS
swoole_runtime/sockets/basic: socket_recvfrom may return an invalid 'from' address on MacOS
--SKIPIF--
<?php require __DIR__ . '/../../../include/skipif.inc'; ?>
<?php
if (strtolower(substr(PHP_OS, 0, 3)) === 'win') {
die('skip not valid for Windows.');
Expand Down
3 changes: 2 additions & 1 deletion tests/swoole_runtime/sockets/basic/ipv4loop.phpt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
--TEST--
IPv4 Loopback test
swoole_runtime/sockets/basic: IPv4 Loopback test
--SKIPIF--
<?php require __DIR__ . '/../../../include/skipif.inc'; ?>
<?php
if (!extension_loaded('sockets')) {
die('skip sockets extension not available.');
Expand Down
3 changes: 2 additions & 1 deletion tests/swoole_runtime/sockets/basic/ipv6loop.phpt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
--TEST--
IPv6 Loopback test
swoole_runtime/sockets/basic: IPv6 Loopback test
--SKIPIF--
<?php require __DIR__ . '/../../../include/skipif.inc'; ?>
<?php
if (!extension_loaded('sockets')) {
die('skip sockets extension not available.');
Expand Down
3 changes: 2 additions & 1 deletion tests/swoole_runtime/sockets/basic/mcast_ipv4_recv.phpt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
--TEST--
Multicast support: IPv4 receive options
swoole_runtime/sockets/basic: IPv4 receive options
--SKIPIF--
<?php require __DIR__ . '/../../../include/skipif.inc'; ?>
<?php
if (!extension_loaded('sockets')) {
die('skip sockets extension not available.');
Expand Down
3 changes: 2 additions & 1 deletion tests/swoole_runtime/sockets/basic/mcast_ipv4_send.phpt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
--TEST--
Multicast support: IPv4 send options
swoole_runtime/sockets/basic: IPv4 send options
--SKIPIF--
<?php require __DIR__ . '/../../../include/skipif.inc'; ?>
<?php
if (!extension_loaded('sockets')) {
die('skip sockets extension not available.');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
--TEST--
Multicast support: IPv4 send options with unusual values
swoole_runtime/sockets/basic: IPv4 send options with unusual values
--SKIPIF--
<?php require __DIR__ . '/../../../include/skipif.inc'; ?>
<?php
if (!extension_loaded('sockets')) {
die('skip sockets extension not available.');
Expand Down
3 changes: 2 additions & 1 deletion tests/swoole_runtime/sockets/basic/mcast_ipv6_recv.phpt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
--TEST--
Multicast support: IPv6 receive options
swoole_runtime/sockets/basic: IPv6 receive options
--SKIPIF--
<?php require __DIR__ . '/../../../include/skipif.inc'; ?>
<?php
if (!extension_loaded('sockets')) {
die('skip sockets extension not available.');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
--TEST--
Multicast support: IPv6 receive options (limited)
swoole_runtime/sockets/basic: IPv6 receive options (limited)
--SKIPIF--
<?php require __DIR__ . '/../../../include/skipif.inc'; ?>
<?php
if (!extension_loaded('sockets')) {
die('skip sockets extension not available.');
Expand Down
3 changes: 2 additions & 1 deletion tests/swoole_runtime/sockets/basic/mcast_ipv6_send.phpt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
--TEST--
Multicast support: IPv6 send options
swoole_runtime/sockets/basic: IPv6 send options
--SKIPIF--
<?php require __DIR__ . '/../../../include/skipif.inc'; ?>
<?php
if (!extension_loaded('sockets')) {
die('skip sockets extension not available.');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
--TEST--
socket_accept() failure
swoole_runtime/sockets/basic: socket_accept() failure
--SKIPIF--
<?php require __DIR__ . '/../../../include/skipif.inc'; ?>
--FILE--
<?php
use Swoole\Runtime;
Expand Down
3 changes: 2 additions & 1 deletion tests/swoole_runtime/sockets/basic/socket_bind.phpt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
--TEST--
ext/sockets - socket_bind - basic test
swoole_runtime/sockets/basic: ext/sockets - socket_bind - basic test
--CREDITS--
Florian Anderiasch
fa@php.net
--SKIPIF--
<?php require __DIR__ . '/../../../include/skipif.inc'; ?>
<?php
if (!extension_loaded('sockets')) {
die('skip - sockets extension not available.');
Expand Down
3 changes: 2 additions & 1 deletion tests/swoole_runtime/sockets/basic/socket_clear_error.phpt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
--TEST--
void socket_clear_error ([ resource $socket ] ) ;
swoole_runtime/sockets/basic: void socket_clear_error ([ resource $socket ] ) ;
--CREDITS--
marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
--SKIPIF--
<?php require __DIR__ . '/../../../include/skipif.inc'; ?>
<?php
if (!extension_loaded('sockets')) {
die('SKIP sockets extension not available.');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
--TEST--
ext/sockets - socket_connect - test with empty parameters
swoole_runtime/sockets/basic: ext/sockets - socket_connect - test with empty parameters
--CREDITS--
Florian Anderiasch
fa@php.net
--SKIPIF--
<?php require __DIR__ . '/../../../include/skipif.inc'; ?>
<?php
if (!extension_loaded('sockets')) {
die('skip - sockets extension not available.');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
--TEST--
Test if socket_create_listen() returns false, when it cannot bind to the port.
swoole_runtime/sockets/basic: Test if socket_create_listen() returns false, when it cannot bind to the port.
--SKIPIF--
<?php require __DIR__ . '/../../../include/skipif.inc'; ?>
<?php
if (!extension_loaded('sockets')) {
die('SKIP The sockets extension is not loaded.');
Expand Down Expand Up @@ -31,4 +32,3 @@ run(function () {
});
?>
--EXPECT--

3 changes: 2 additions & 1 deletion tests/swoole_runtime/sockets/basic/socket_create_listen.phpt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
--TEST--
Test if socket binds on 31338
swoole_runtime/sockets/basic: Test if socket binds on 31338
--SKIPIF--
<?php require __DIR__ . '/../../../include/skipif.inc'; ?>
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip.. Not valid for Windows');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
--TEST--
ext/sockets - socket_create_listen - test for used socket
swoole_runtime/sockets/basic: ext/sockets - socket_create_listen - test for used socket
--CREDITS--
Florian Anderiasch
fa@php.net
--SKIPIF--
<?php require __DIR__ . '/../../../include/skipif.inc'; ?>
<?php
if (!extension_loaded('sockets')) {
die('skip - sockets extension not available.');
Expand All @@ -30,4 +31,3 @@ run(function () {
});
?>
--EXPECT--

3 changes: 2 additions & 1 deletion tests/swoole_runtime/sockets/basic/socket_create_pair.phpt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
--TEST--
Test for socket_create_pair()
swoole_runtime/sockets/basic: Test for socket_create_pair()
--SKIPIF--
<?php require __DIR__ . '/../../../include/skipif.inc'; ?>
<?php
if (!extension_loaded('sockets')) {
die('SKIP The sockets extension is not loaded.');
Expand Down
4 changes: 2 additions & 2 deletions tests/swoole_runtime/sockets/basic/socket_getopt.phpt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
--TEST--
mixed socket_getopt( resource $socket , int $level , int $optname ) ;
swoole_runtime/sockets/basic: mixed socket_getopt( resource $socket , int $level , int $optname ) ;
--CREDITS--
marcosptf -
<marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
--SKIPIF--
<?php require __DIR__ . '/../../../include/skipif.inc'; ?>
<?php
if (!extension_loaded('sockets')) {
die('skip sockets extension not available.');
Expand Down Expand Up @@ -61,7 +62,6 @@ run(function () {
unset($r);
});
?>

--EXPECT--
Setting IP_MULTICAST_TTL
bool(true)
Expand Down
Loading

0 comments on commit ba72231

Please sign in to comment.