Skip to content

Commit

Permalink
Update version for Swoole 4.5.0RC1
Browse files Browse the repository at this point in the history
  • Loading branch information
twose committed Apr 8, 2020
1 parent 0994a1e commit b50c4a2
Show file tree
Hide file tree
Showing 21 changed files with 229 additions and 133 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.4.13)
SET(SWOOLE_VERSION 4.5.0RC1)
SET(SWOOLE_CLFLAGS pthread rt dl ssl crypt crypto)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -g")
Expand Down
2 changes: 1 addition & 1 deletion config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ if test "$PHP_SWOOLE" != "no"; then
src/pipe/unix_socket.cc \
src/protocol/base.cc \
src/protocol/base64.cc \
src/protocol/dtls.cc \
src/protocol/http.cc \
src/protocol/http2.cc \
src/protocol/mime_type.cc \
Expand All @@ -465,7 +466,6 @@ if test "$PHP_SWOOLE" != "no"; then
src/protocol/sha1.cc \
src/protocol/socks5.cc \
src/protocol/ssl.cc \
src/protocol/dtls.cc \
src/protocol/websocket.cc \
src/reactor/base.cc \
src/reactor/epoll.cc \
Expand Down
4 changes: 2 additions & 2 deletions include/swoole_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#define SWOOLE_MAJOR_VERSION 4
#define SWOOLE_MINOR_VERSION 5
#define SWOOLE_RELEASE_VERSION 0
#define SWOOLE_EXTRA_VERSION "alpha"
#define SWOOLE_VERSION "4.5.0-alpha"
#define SWOOLE_EXTRA_VERSION "RC1"
#define SWOOLE_VERSION "4.5.0RC1"
#define SWOOLE_VERSION_ID 40500
#define SWOOLE_API_VERSION_ID 0x202003a

Expand Down
310 changes: 197 additions & 113 deletions package.xml

Large diffs are not rendered by default.

13 changes: 11 additions & 2 deletions php_swoole_library.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Generated by build-library.php, Please DO NOT modify!
*/

/* $Id: f05f7904f9245b0ef4cbd62af565036596992465 */
/* $Id: 7c913105c3273aab005489d78e0ff9043bfecb54 */

static const char* swoole_library_source_constants =
"\n"
Expand Down Expand Up @@ -1725,7 +1725,7 @@ static const char* swoole_library_source_core_connection_pool =
"\n"
" public function fill(): void\n"
" {\n"
" while ($this->size < $this->num) {\n"
" while ($this->size > $this->num) {\n"
" $this->make();\n"
" }\n"
" }\n"
Expand Down Expand Up @@ -2452,6 +2452,7 @@ static const char* swoole_library_source_core_database_pdo_proxy =
"class PDOProxy extends ObjectProxy\n"
"{\n"
" public const IO_METHOD_REGEX = '/^query|prepare|exec|beginTransaction|commit|rollback$/i';\n"
"\n"
" public const IO_ERRORS = [\n"
" 2002, // MYSQLND_CR_CONNECTION_ERROR\n"
" 2006, // MYSQLND_CR_SERVER_GONE_ERROR\n"
Expand Down Expand Up @@ -3230,6 +3231,8 @@ static const char* swoole_library_source_core_curl_handler =
"\n"
" private $errMsg = '';\n"
"\n"
" private $failOnError = false;\n"
"\n"
" private $closed = false;\n"
"\n"
" public function __construct(string $url = '')\n"
Expand Down Expand Up @@ -3586,6 +3589,9 @@ static const char* swoole_library_source_core_curl_handler =
" return false;\n"
" }\n"
" break;\n"
" case CURLOPT_FAILONERROR:\n"
" $this->failOnError = $value;\n"
" break;\n"
" /*\n"
" * Http Cookie\n"
" */\n"
Expand Down Expand Up @@ -3808,6 +3814,9 @@ static const char* swoole_library_source_core_curl_handler =
" $this->info['redirect_url'] = $redirectUrl;\n"
" break;\n"
" }\n"
" } elseif ($this->failOnError && $client->statusCode >= 400) {\n"
" $this->setError(CURLE_HTTP_RETURNED_ERROR, \"The requested URL returned error: {$client->statusCode} \" . Status::getReasonPhrase($client->statusCode));\n"
" return false;\n"
" } else {\n"
" break;\n"
" }\n"
Expand Down
2 changes: 2 additions & 0 deletions src/core/error.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ const char* swoole_strerror(int code)
return "Session invalid id";
case SW_ERROR_SESSION_DISCARD_TIMEOUT_DATA:
return "Session discard timeout data";
case SW_ERROR_SESSION_DISCARD_DATA:
return "Session discard data";
case SW_ERROR_OUTPUT_BUFFER_OVERFLOW:
return "Output buffer overflow";
case SW_ERROR_OUTPUT_SEND_YIELD:
Expand Down
1 change: 1 addition & 0 deletions swoole.cc
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ PHP_MINIT_FUNCTION(swoole)
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_SESSION_NOT_EXIST", SW_ERROR_SESSION_NOT_EXIST);
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_SESSION_INVALID_ID", SW_ERROR_SESSION_INVALID_ID);
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_SESSION_DISCARD_TIMEOUT_DATA", SW_ERROR_SESSION_DISCARD_TIMEOUT_DATA);
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_SESSION_DISCARD_DATA", SW_ERROR_SESSION_DISCARD_DATA);
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_OUTPUT_BUFFER_OVERFLOW", SW_ERROR_OUTPUT_BUFFER_OVERFLOW);
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_OUTPUT_SEND_YIELD", SW_ERROR_OUTPUT_SEND_YIELD);
SW_REGISTER_LONG_CONSTANT("SWOOLE_ERROR_SSL_NOT_READY", SW_ERROR_SSL_NOT_READY);
Expand Down
2 changes: 1 addition & 1 deletion tests/swoole_client_coro/dtls.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
swoole_server/ssl: dtls
swoole_client_coro: dtls
--SKIPIF--
<?php require __DIR__ . '/../include/skipif.inc'; ?>
--FILE--
Expand Down
2 changes: 1 addition & 1 deletion tests/swoole_server/check_chunk_total_size.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ $pm->childFunc = function () use ($pm)
$pm->childFirst();
$pm->run();
?>
--EXPECT--
--EXPECT--
2 changes: 1 addition & 1 deletion tests/swoole_server/object/getInstance.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
swoole_server: getInstance
swoole_server/object: getInstance
--SKIPIF--
<?php
require __DIR__ . '/../../include/skipif.inc';
Expand Down
2 changes: 1 addition & 1 deletion tests/swoole_server/object/getManagerPid.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
swoole_server: getMasterPid
swoole_server/object: getMasterPid
--SKIPIF--
<?php
require __DIR__ . '/../../include/skipif.inc';
Expand Down
2 changes: 1 addition & 1 deletion tests/swoole_server/object/getMasterPid.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
swoole_server: getMasterPid
swoole_server/object: getMasterPid
--SKIPIF--
<?php
require __DIR__ . '/../../include/skipif.inc';
Expand Down
2 changes: 1 addition & 1 deletion tests/swoole_server/object/getWorkerId.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
swoole_server: getWorkerId()
swoole_server/object: getWorkerId()
--SKIPIF--
<?php
require __DIR__ . '/../../include/skipif.inc';
Expand Down
2 changes: 1 addition & 1 deletion tests/swoole_server/object/getWorkerPid.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
swoole_server: getWorkerPid()
swoole_server/object: getWorkerPid()
--SKIPIF--
<?php
require __DIR__ . '/../../include/skipif.inc';
Expand Down
2 changes: 1 addition & 1 deletion tests/swoole_server/onReload.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ $pm->run();
--EXPECT--
string(12) "BeforeReload"
string(11) "AfterReload"
DONE
DONE
2 changes: 1 addition & 1 deletion tests/swoole_server_coro/length_1.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
swoole_coroutine_server: (length protocol) 1
swoole_server_coro: (length protocol) 1
--SKIPIF--
<?php require __DIR__ . '/../include/skipif.inc'; ?>
--FILE--
Expand Down
2 changes: 1 addition & 1 deletion tests/swoole_server_coro/random_port.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
swoole_coroutine_server: bind random port
swoole_server_coro: bind random port
--SKIPIF--
<?php require __DIR__ . '/../include/skipif.inc'; ?>
--FILE--
Expand Down
2 changes: 1 addition & 1 deletion tests/swoole_server_coro/reuse_port.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
swoole_coroutine_server: reuse port
swoole_server_coro: reuse port
--SKIPIF--
<?php require __DIR__ . '/../include/skipif.inc';
?>
Expand Down
2 changes: 1 addition & 1 deletion tests/swoole_server_coro/ssl.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
swoole_coroutine_server: ssl
swoole_server_coro: ssl
--SKIPIF--
<?php require __DIR__ . '/../include/skipif.inc'; ?>
--FILE--
Expand Down
2 changes: 1 addition & 1 deletion tests/swoole_server_coro/tcp.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
swoole_coroutine_server: tcp
swoole_server_coro: tcp
--SKIPIF--
<?php require __DIR__ . '/../include/skipif.inc'; ?>
--FILE--
Expand Down
2 changes: 1 addition & 1 deletion tools/pecl-package.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function check_source_ver(string $expect_ver, $source_file)
echo "[API-Ver] => {$package_api_ver}\n";
echo "[RStable] => {$package_release_stable}\n";
echo "[AStable] => {$package_api_stable}\n";
check_source_ver($package_release_ver, dirname(__DIR__) . '/include/swoole.h');
check_source_ver($package_release_ver, dirname(__DIR__) . '/include/swoole_version.h');
check_source_ver($package_release_ver, dirname(__DIR__) . '/CMakeLists.txt');

// check file lists
Expand Down

0 comments on commit b50c4a2

Please sign in to comment.