diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | 170.patch | 31 | ||||
-rw-r--r-- | 195.patch | 287 | ||||
-rw-r--r-- | 216.patch | 38 | ||||
-rw-r--r-- | 222.patch | 52 | ||||
-rw-r--r-- | 228.patch | 122 | ||||
-rw-r--r-- | REFLECTION | 645 | ||||
-rw-r--r-- | php-pecl-zmq.spec | 159 |
8 files changed, 742 insertions, 594 deletions
@@ -1,5 +1,7 @@ +clog package-*.xml *.tgz +*.tar.bz2 *.tar.gz *.tar.xz *.tar.xz.asc diff --git a/170.patch b/170.patch deleted file mode 100644 index 45cde0b..0000000 --- a/170.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 7c961507e24435680e445b90af0a465c98246d4d Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@famillecollet.com> -Date: Mon, 1 Feb 2016 08:09:46 +0100 -Subject: [PATCH] Fix build with old GCC - ---- - zmq_pollset.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/zmq_pollset.c b/zmq_pollset.c -index 16dbdec..59f8c09 100644 ---- a/zmq_pollset.c -+++ b/zmq_pollset.c -@@ -38,7 +38,7 @@ - - /* {{{ typedef struct _php_zmq_pollset - */ --typedef struct _php_zmq_pollset { -+struct _php_zmq_pollset { - - zmq_pollitem_t *items; - zend_string **keys; -@@ -49,7 +49,7 @@ typedef struct _php_zmq_pollset { - size_t alloc_size; - - zval errors; --} php_zmq_pollset; -+}; - /* }}} */ - - static diff --git a/195.patch b/195.patch deleted file mode 100644 index 52881ea..0000000 --- a/195.patch +++ /dev/null @@ -1,287 +0,0 @@ -From af02bde61c2a5af1ae64cac09ffe2b25237aa58e Mon Sep 17 00:00:00 2001 -From: Alex/AT <alex@alex-at.net> -Date: Mon, 10 Dec 2018 06:02:27 +0300 -Subject: [PATCH 1/2] PHP 7.3 compatibility and bugfixes - -- Define new GC_ADDREF/DELREF/SET_REFCOUNT macros for older PHP versions and use them instead of direct GC reference counter access - -- Fixup all necessary 'long' type parameters to 'zend_long', PHP 7.3 makes it mandatory, also fixup some direct function implementations to accept the same - -- In php_zmq_recv(), zend_string_init() was wrongly called with third parameter as '1', marking new string with IS_STR_PERSISTENT, this caused heap corruption and/or segfaults with PHP 7.3 and could possibly cause other sorts of bugs under any 7.x version - With ZVAL_STRINGL macro, this last '1' parameter meant to copy the string and was seemingly erroneously moved to zend_string_init(). zend_string_init() copies string by default, and last parameter has totally different meaning here - -- In poll(), flag ZVAL separation on passed arrays (PHP 7.3 makes it mandatory) - -- Test 19 (exception on connect callback with forced reference parameter): skip on PHP 7.1 and higher, PHP >= 7.1 started to fallback to passing argument by value instead of failing - -- Test 21 (warning generation from callback): it is ok, but PHP 7.3 uses 'int' instead of 'integer' for constants, so allow any word in place of the word 'integer' ---- - php_zmq.h | 6 ++++ - tests/019-callbackinvalidsignature.phpt | 3 +- - tests/021-callbackwarning.phpt | 2 +- - zmq.c | 40 ++++++++++++------------- - zmq_sockopt.c | 4 +-- - 5 files changed, 30 insertions(+), 25 deletions(-) - -diff --git a/php_zmq.h b/php_zmq.h -index ef50bfb..3833967 100644 ---- a/php_zmq.h -+++ b/php_zmq.h -@@ -44,6 +44,12 @@ - - #include "php.h" - -+#if PHP_VERSION_ID < 70300 -+#define GC_ADDREF(p) ++GC_REFCOUNT(p) -+#define GC_DELREF(p) --GC_REFCOUNT(p) -+#define GC_SET_REFCOUNT(p, rc) GC_REFCOUNT(p) = rc -+#endif -+ - extern zend_module_entry zmq_module_entry; - #define phpext_zmq_ptr &zmq_module_entry - -diff --git a/tests/019-callbackinvalidsignature.phpt b/tests/019-callbackinvalidsignature.phpt -index 753de31..b5bb20c 100644 ---- a/tests/019-callbackinvalidsignature.phpt -+++ b/tests/019-callbackinvalidsignature.phpt -@@ -1,7 +1,8 @@ - --TEST-- - Test callback edge-cases - --SKIPIF-- --<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> -+<?php require_once(dirname(__FILE__) . '/skipif.inc'); -+if (PHP_VERSION_ID >= 70100) die("skip PHP 7.1 and higher fallback to passing argument by value even when forced to reference"); ?> - --FILE-- - <?php - -diff --git a/tests/021-callbackwarning.phpt b/tests/021-callbackwarning.phpt -index 435743e..eba2ecf 100644 ---- a/tests/021-callbackwarning.phpt -+++ b/tests/021-callbackwarning.phpt -@@ -13,5 +13,5 @@ function generate_warning($a, $b) - $socket = new ZMQSocket(new ZMQContext(), ZMQ::SOCKET_REQ, 'persistent_socket', 'generate_warning'); - - --EXPECTF-- --Warning: in_array() expects parameter 2 to be array, integer given in %s on line %d -+Warning: in_array() expects parameter 2 to be array, %s given in %s on line %d - -diff --git a/zmq.c b/zmq.c -index 942e69b..57ebd11 100644 ---- a/zmq.c -+++ b/zmq.c -@@ -235,7 +235,7 @@ php_zmq_context *php_zmq_context_get(zend_long io_threads, zend_bool is_persiste - le.type = php_zmq_context_list_entry(); - le.ptr = context; - -- GC_REFCOUNT(&le) = 1; -+ GC_SET_REFCOUNT(&le, 1); - - /* plist_key is not a persistent allocated key, thus we use str_update here */ - if (zend_hash_str_update_mem(&EG(persistent_list), plist_key->val, plist_key->len, &le, sizeof(le)) == NULL) { -@@ -369,7 +369,7 @@ PHP_METHOD(zmq, curvekeypair) - PHP_METHOD(zmqcontext, __construct) - { - php_zmq_context_object *intern; -- long io_threads = 1; -+ zend_long io_threads = 1; - zend_bool is_persistent = 1; - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "|lb", &io_threads, &is_persistent) == FAILURE) { -@@ -495,7 +495,7 @@ PHP_METHOD(zmqcontext, getOpt) - Create a new zmq socket - */ - static --php_zmq_socket *php_zmq_socket_new(php_zmq_context *context, int type, zend_bool is_persistent) -+php_zmq_socket *php_zmq_socket_new(php_zmq_context *context, zend_long type, zend_bool is_persistent) - { - php_zmq_socket *zmq_sock; - -@@ -503,7 +503,7 @@ php_zmq_socket *php_zmq_socket_new(php_zmq_context *context, int type, zend_bool - zmq_sock->z_socket = zmq_socket(context->z_ctx, type); - zmq_sock->pid = getpid(); - zmq_sock->ctx = context; -- zmq_sock->socket_type = type; -+ zmq_sock->socket_type = type; - - if (!zmq_sock->z_socket) { - pefree(zmq_sock, is_persistent); -@@ -535,7 +535,7 @@ void php_zmq_socket_store(php_zmq_socket *zmq_sock_p, zend_long type, zend_strin - le.type = php_zmq_socket_list_entry(); - le.ptr = zmq_sock_p; - -- GC_REFCOUNT(&le) = 1; -+ GC_SET_REFCOUNT(&le, 1); - - plist_key = php_zmq_socket_plist_key(type, persistent_id, use_shared_ctx); - -@@ -796,7 +796,7 @@ PHP_METHOD(zmqsocket, __construct) - - /* {{{ static zend_bool php_zmq_send(php_zmq_socket_object *intern, char *message_param, long flags) - */ --static zend_bool php_zmq_send(php_zmq_socket_object *intern, zend_string *message_param, long flags) -+static zend_bool php_zmq_send(php_zmq_socket_object *intern, zend_string *message_param, zend_long flags) - { - int rc, errno_; - zmq_msg_t message; -@@ -828,7 +828,7 @@ static void php_zmq_sendmsg_impl(INTERNAL_FUNCTION_PARAMETERS) - { - php_zmq_socket_object *intern; - zend_string *message_param; -- long flags = 0; -+ zend_long flags = 0; - zend_bool ret; - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "S|l", &message_param, &flags) == FAILURE) { -@@ -890,7 +890,7 @@ PHP_METHOD(zmqsocket, sendmulti) - zval *messages; - php_zmq_socket_object *intern; - int to_send, ret = 0; -- long flags = 0; -+ zend_long flags = 0; - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "a|l", &messages, &flags) == FAILURE) { - return; -@@ -910,7 +910,7 @@ PHP_METHOD(zmqsocket, sendmulti) - /* {{{ static zend_bool php_zmq_recv(php_zmq_socket_object *intern, long flags, zval *return_value) - */ - static --zend_string *php_zmq_recv(php_zmq_socket_object *intern, long flags) -+zend_string *php_zmq_recv(php_zmq_socket_object *intern, zend_long flags) - { - int rc, errno_; - zmq_msg_t message; -@@ -933,7 +933,7 @@ zend_string *php_zmq_recv(php_zmq_socket_object *intern, long flags) - return NULL; - } - -- str = zend_string_init(zmq_msg_data(&message), zmq_msg_size(&message), 1); -+ str = zend_string_init(zmq_msg_data(&message), zmq_msg_size(&message), 0); - zmq_msg_close(&message); - return str; - } -@@ -943,7 +943,7 @@ static void php_zmq_recvmsg_impl(INTERNAL_FUNCTION_PARAMETERS) - { - zend_string *str = NULL; - php_zmq_socket_object *intern; -- long flags = 0; -+ zend_long flags = 0; - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &flags) == FAILURE) { - return; -@@ -974,7 +974,7 @@ PHP_METHOD(zmqsocket, recvmulti) - { - php_zmq_socket_object *intern; - size_t value_len; -- long flags = 0; -+ zend_long flags = 0; - #if ZMQ_VERSION_MAJOR < 3 - int64_t value; - #else -@@ -1303,7 +1303,7 @@ PHP_METHOD(zmqpoll, add) - { - php_zmq_poll_object *intern; - zval *object; -- long events; -+ zend_long events; - int error; - zend_string *key; - -@@ -1423,10 +1423,10 @@ PHP_METHOD(zmqpoll, poll) - php_zmq_poll_object *intern; - zval *r_array, *w_array; - -- long timeout = -1; -+ zend_long timeout = -1; - int rc; - -- if (zend_parse_parameters(ZEND_NUM_ARGS(), "a!a!|l", &r_array, &w_array, &timeout) == FAILURE) { -+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "a!/a!/|l", &r_array, &w_array, &timeout) == FAILURE) { - return; - } - -@@ -1592,7 +1592,7 @@ void s_clear_device_callback (php_zmq_device_cb_t *cb) - } - - static --void s_init_device_callback (php_zmq_device_cb_t *cb, zend_fcall_info *fci, zend_fcall_info_cache *fci_cache, long timeout, zval *user_data) -+void s_init_device_callback (php_zmq_device_cb_t *cb, zend_fcall_info *fci, zend_fcall_info_cache *fci_cache, zend_long timeout, zval *user_data) - { - memcpy (&cb->fci, fci, sizeof (zend_fcall_info)); - memcpy (&cb->fci_cache, fci_cache, sizeof (zend_fcall_info_cache)); -@@ -1615,7 +1615,7 @@ void s_init_device_callback (php_zmq_device_cb_t *cb, zend_fcall_info *fci, zend - PHP_METHOD(zmqdevice, setidletimeout) - { - php_zmq_device_object *intern; -- long timeout; -+ zend_long timeout; - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &timeout) == FAILURE) { - return; -@@ -1644,7 +1644,7 @@ PHP_METHOD(zmqdevice, getidletimeout) - PHP_METHOD(zmqdevice, settimertimeout) - { - php_zmq_device_object *intern; -- long timeout; -+ zend_long timeout; - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &timeout) == FAILURE) { - return; -@@ -1676,7 +1676,7 @@ PHP_METHOD(zmqdevice, setidlecallback) - zval *user_data = NULL; - zend_fcall_info fci; - zend_fcall_info_cache fci_cache; -- long timeout = 0; -+ zend_long timeout = 0; - - if (ZEND_NUM_ARGS() == 2) { - php_error_docref(NULL, E_DEPRECATED, "The signature for setIdleCallback has changed, please update your code"); -@@ -1718,7 +1718,7 @@ PHP_METHOD(zmqdevice, settimercallback) - zval *user_data = NULL; - zend_fcall_info fci; - zend_fcall_info_cache fci_cache; -- long timeout; -+ zend_long timeout; - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "fl|z!", &fci, &fci_cache, &timeout, &user_data) == FAILURE) { - return; -diff --git a/zmq_sockopt.c b/zmq_sockopt.c -index 1357032..3a00421 100644 ---- a/zmq_sockopt.c -+++ b/zmq_sockopt.c -@@ -1,5 +1,3 @@ -- -- - /* - +-----------------------------------------------------------------------------------+ - | ZMQ extension for PHP | -@@ -2033,7 +2031,7 @@ PHP_METHOD(zmqsocket, getsockopt) - PHP_METHOD(zmqsocket, setsockopt) - { - php_zmq_socket_object *intern; -- long key; -+ zend_long key; - zval *zv; - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lz/", &key, &zv) == FAILURE) { - -From 55a19a84c36df4a2b75bc0acba19c0a9d9da3bd0 Mon Sep 17 00:00:00 2001 -From: Alex/AT <alex@alex-at.ru> -Date: Tue, 11 Dec 2018 15:11:44 +0300 -Subject: [PATCH 2/2] Update README.md - ---- - README.md | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/README.md b/README.md -index a798b54..6c0cd56 100644 ---- a/README.md -+++ b/README.md -@@ -1,7 +1,5 @@ - PHP bindings for 0MQ. The documentation is available at http://php.net/zmq - --[![Build Status](https://travis-ci.org/mkoppanen/php-zmq.png?branch=master)](https://travis-ci.org/mkoppanen/php-zmq) -- - The API is roughly as follows: - - <?php diff --git a/216.patch b/216.patch new file mode 100644 index 0000000..848125b --- /dev/null +++ b/216.patch @@ -0,0 +1,38 @@ +From f0993f1fe973c4d359323ad1897ed7aa74f7e015 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Mon, 24 Aug 2020 15:55:54 +0200 +Subject: [PATCH] fix for PHP 8.0.0beta2 + +--- + zmq.c | 2 ++ + zmq_device.c | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/zmq.c b/zmq.c +index 89902f9..bd2401d 100644 +--- a/zmq.c ++++ b/zmq.c +@@ -621,7 +621,9 @@ zend_bool php_zmq_connect_callback(zval *socket, zend_fcall_info *fci, zend_fcal + fci->params = params; + fci->param_count = 2; + fci->retval = &retval; ++#if PHP_VERSION_ID < 80000 + fci->no_separation = 1; ++#endif + + if (zend_call_function(fci, fci_cache) == FAILURE) { + if (!EG(exception)) { +diff --git a/zmq_device.c b/zmq_device.c +index 534f966..1c6aa3e 100644 +--- a/zmq_device.c ++++ b/zmq_device.c +@@ -53,7 +53,9 @@ zend_bool s_invoke_device_cb (php_zmq_device_cb_t *cb, uint64_t current_ts) + cb->fci.param_count = 1; + + /* Call the cb */ ++#if PHP_VERSION_ID < 80000 + cb->fci.no_separation = 1; ++#endif + cb->fci.retval = &fc_retval; + + if (zend_call_function(&(cb->fci), &(cb->fci_cache)) == FAILURE) { diff --git a/222.patch b/222.patch new file mode 100644 index 0000000..b19a86e --- /dev/null +++ b/222.patch @@ -0,0 +1,52 @@ +From 9af012efcfb256dd96b72ea8d1ac1b8498903118 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Wed, 3 Nov 2021 12:10:19 +0100 +Subject: [PATCH] Fix for PHP 8.1 + +--- + tests/053-z85.phpt | 6 +++--- + zmq_pollset.c | 7 ++++++- + 2 files changed, 9 insertions(+), 4 deletions(-) + +diff --git a/tests/053-z85.phpt b/tests/053-z85.phpt +index f486815..549fa5f 100644 +--- a/tests/053-z85.phpt ++++ b/tests/053-z85.phpt +@@ -41,12 +41,12 @@ for ($i = 4; $i <= 256; $i += 4) { + + // Incorrect length + test_z85_encode('1234567', null); +-test_z85_encode(null, null); ++test_z85_encode('', null); + + test_z85_decode('1234567', null); +-test_z85_decode(null, null); ++test_z85_decode('', null); + + echo "OK"; + + --EXPECT-- +-OK +\ No newline at end of file ++OK +diff --git a/zmq_pollset.c b/zmq_pollset.c +index 3e4ed15..0bf1098 100644 +--- a/zmq_pollset.c ++++ b/zmq_pollset.c +@@ -169,10 +169,15 @@ static + zend_string *s_create_key(zval *entry) + { + if (Z_TYPE_P(entry) == IS_RESOURCE) { +- return strpprintf(0, "r:%d", Z_RES_P(entry)->handle); ++ /* zend_long since 8.1.0 */ ++ return strpprintf(0, "r:%ld", (long)Z_RES_P(entry)->handle); + } + else { ++#if PHP_VERSION_ID >= 80100 ++ zend_string *hash = php_spl_object_hash(Z_OBJ_P(entry)); ++#else + zend_string *hash = php_spl_object_hash(entry); ++#endif + zend_string *key = strpprintf(0, "o:%s", hash->val); + zend_string_release(hash); + return key; diff --git a/228.patch b/228.patch new file mode 100644 index 0000000..7448172 --- /dev/null +++ b/228.patch @@ -0,0 +1,122 @@ +From 68d4bf090b6a12e40dcd6178837ef729f43c2d2e Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Fri, 17 Jun 2022 15:04:34 +0200 +Subject: [PATCH] fix 8.2 deprecations + +--- + tests/007-addremovepoll.phpt | 6 +++--- + tests/036-device.phpt | 8 ++++---- + tests/037-device-deprecated.phpt | 4 ++-- + tests/048-pollsetitems.phpt | 6 +++--- + 4 files changed, 12 insertions(+), 12 deletions(-) + +diff --git a/tests/007-addremovepoll.phpt b/tests/007-addremovepoll.phpt +index a37762f..645d212 100644 +--- a/tests/007-addremovepoll.phpt ++++ b/tests/007-addremovepoll.phpt +@@ -16,14 +16,14 @@ $z = create_client(); + $socket_server = stream_socket_server("tcp://127.0.0.1:5858", $errno, $errstr); + + if (!$socket_server) { +- echo "Failed to create socket server: ${errstr}" . PHP_EOL; ++ echo "Failed to create socket server: {$errstr}" . PHP_EOL; + exit (1); + } + + $socket_client = stream_socket_client("tcp://127.0.0.1:5858", $errno, $errstr); + + if (!$socket_client) { +- echo "Failed to create socket client: ${errstr}" . PHP_EOL; ++ echo "Failed to create socket client: {$errstr}" . PHP_EOL; + exit (1); + } + +@@ -73,4 +73,4 @@ array(1) { + [0]=> + string(3) "r:%d" + } +-int(0) +\ No newline at end of file ++int(0) +diff --git a/tests/036-device.phpt b/tests/036-device.phpt +index 507e902..0fcc15e 100644 +--- a/tests/036-device.phpt ++++ b/tests/036-device.phpt +@@ -17,11 +17,11 @@ class CbStateData + protected $_name; + + public function __construct ($name) { +- $this->name = $name; ++ $this->_name = $name; + } + + public function getName () { +- return $this->name; ++ return $this->_name; + } + + public function increment () +@@ -58,7 +58,7 @@ $orig_cb = function ($user_data) use (&$last_called, $device) { + $time_elapsed = (proper_microtime () - $last_called) + 1; + + if ($time_elapsed < $device->getTimerTimeout ()) { +- echo "Called too early, only ${time_elapsed}ms elapsed, expected {$device->getTimerTimeout ()}" . PHP_EOL; ++ echo "Called too early, only {$time_elapsed}ms elapsed, expected {$device->getTimerTimeout ()}" . PHP_EOL; + } + + $device->setTimerTimeout ($device->getTimerTimeout () + 50); +@@ -100,4 +100,4 @@ Triggered for 160ms timeout + timer function called 2 times + Triggered for 210ms timeout + timer function called 3 times +-OK +\ No newline at end of file ++OK +diff --git a/tests/037-device-deprecated.phpt b/tests/037-device-deprecated.phpt +index 82beb16..4f1ce37 100644 +--- a/tests/037-device-deprecated.phpt ++++ b/tests/037-device-deprecated.phpt +@@ -14,7 +14,7 @@ $device = new ZMQDevice($s1, $ctx->getSocket(ZMQ::SOCKET_PUB)); + + // Setup callback and user data for callback + $device->setIdleTimeout (100); +-$device->setIdleCallback (function ($user_data) { echo "Called: ${user_data}" . PHP_EOL; return false; }, "test"); ++$device->setIdleCallback (function ($user_data) { echo "Called: {$user_data}" . PHP_EOL; return false; }, "test"); + + // Run first time + $device->run (); +@@ -24,4 +24,4 @@ echo "OK"; + --EXPECTF-- + Deprecated: ZMQDevice::setidlecallback(): The signature for setIdleCallback has changed, please update your code in %s on line %d + Called: test +-OK +\ No newline at end of file ++OK +diff --git a/tests/048-pollsetitems.phpt b/tests/048-pollsetitems.phpt +index 0f0f316..5079809 100644 +--- a/tests/048-pollsetitems.phpt ++++ b/tests/048-pollsetitems.phpt +@@ -19,14 +19,14 @@ $poll = new ZMQPoll(); + $socket_server = stream_socket_server("tcp://127.0.0.1:5858", $errno, $errstr); + + if (!$socket_server) { +- echo "Failed to create socket server: ${errstr}" . PHP_EOL; ++ echo "Failed to create socket server: {$errstr}" . PHP_EOL; + exit (1); + } + + $socket_client = stream_socket_client("tcp://127.0.0.1:5858", $errno, $errstr); + + if (!$socket_client) { +- echo "Failed to create socket client: ${errstr}" . PHP_EOL; ++ echo "Failed to create socket client: {$errstr}" . PHP_EOL; + exit (1); + } + +@@ -58,4 +58,4 @@ array(3) { + } + array(0) { + } +-OK +\ No newline at end of file ++OK @@ -1,98 +1,162 @@ -Extension [ <persistent> extension #193 zmq version 1.1.3 ] { +Extension [ <persistent> extension #124 zmq version 1.1.3 ] { - Classes [10] { Class [ <internal:zmq> class ZMQ ] { - - Constants [78] { - Constant [ integer SOCKET_PAIR ] { 0 } - Constant [ integer SOCKET_PUB ] { 1 } - Constant [ integer SOCKET_SUB ] { 2 } - Constant [ integer SOCKET_XSUB ] { 10 } - Constant [ integer SOCKET_XPUB ] { 9 } - Constant [ integer SOCKET_REQ ] { 3 } - Constant [ integer SOCKET_REP ] { 4 } - Constant [ integer SOCKET_XREQ ] { 5 } - Constant [ integer SOCKET_XREP ] { 6 } - Constant [ integer SOCKET_PUSH ] { 8 } - Constant [ integer SOCKET_PULL ] { 7 } - Constant [ integer SOCKET_DEALER ] { 5 } - Constant [ integer SOCKET_ROUTER ] { 6 } - Constant [ integer SOCKET_STREAM ] { 11 } - Constant [ integer SOCKET_UPSTREAM ] { 7 } - Constant [ integer SOCKET_DOWNSTREAM ] { 8 } - Constant [ integer POLL_IN ] { 1 } - Constant [ integer POLL_OUT ] { 2 } - Constant [ integer MODE_SNDMORE ] { 2 } - Constant [ integer MODE_NOBLOCK ] { 1 } - Constant [ integer MODE_DONTWAIT ] { 1 } - Constant [ integer DEVICE_FORWARDER ] { 2 } - Constant [ integer DEVICE_QUEUE ] { 3 } - Constant [ integer DEVICE_STREAMER ] { 1 } - Constant [ integer ERR_INTERNAL ] { -99 } - Constant [ integer ERR_EAGAIN ] { 11 } - Constant [ integer ERR_ENOTSUP ] { 95 } - Constant [ integer ERR_EFSM ] { 156384763 } - Constant [ integer ERR_ETERM ] { 156384765 } - Constant [ string LIBZMQ_VER ] { 4.1.2 } - Constant [ integer SOCKOPT_HWM ] { 201 } - Constant [ integer SOCKOPT_SNDHWM ] { 23 } - Constant [ integer SOCKOPT_RCVHWM ] { 24 } - Constant [ integer SOCKOPT_AFFINITY ] { 4 } - Constant [ integer SOCKOPT_IDENTITY ] { 5 } - Constant [ integer SOCKOPT_RATE ] { 8 } - Constant [ integer SOCKOPT_RECOVERY_IVL ] { 9 } - Constant [ integer SOCKOPT_SNDBUF ] { 11 } - Constant [ integer SOCKOPT_RCVBUF ] { 12 } - Constant [ integer SOCKOPT_LINGER ] { 17 } - Constant [ integer SOCKOPT_RECONNECT_IVL ] { 18 } - Constant [ integer SOCKOPT_RECONNECT_IVL_MAX ] { 21 } - Constant [ integer SOCKOPT_BACKLOG ] { 19 } - Constant [ integer SOCKOPT_MAXMSGSIZE ] { 22 } - Constant [ integer SOCKOPT_SUBSCRIBE ] { 6 } - Constant [ integer SOCKOPT_UNSUBSCRIBE ] { 7 } - Constant [ integer SOCKOPT_TYPE ] { 16 } - Constant [ integer SOCKOPT_RCVMORE ] { 13 } - Constant [ integer SOCKOPT_FD ] { 14 } - Constant [ integer SOCKOPT_EVENTS ] { 15 } - Constant [ integer SOCKOPT_SNDTIMEO ] { 28 } - Constant [ integer SOCKOPT_RCVTIMEO ] { 27 } - Constant [ integer SOCKOPT_IPV4ONLY ] { 31 } - Constant [ integer SOCKOPT_LAST_ENDPOINT ] { 32 } - Constant [ integer SOCKOPT_TCP_KEEPALIVE ] { 34 } - Constant [ integer SOCKOPT_TCP_KEEPALIVE_IDLE ] { 36 } - Constant [ integer SOCKOPT_TCP_KEEPALIVE_CNT ] { 35 } - Constant [ integer SOCKOPT_TCP_KEEPALIVE_INTVL ] { 37 } - Constant [ integer SOCKOPT_TCP_ACCEPT_FILTER ] { 38 } - Constant [ integer SOCKOPT_DELAY_ATTACH_ON_CONNECT ] { 39 } - Constant [ integer SOCKOPT_XPUB_VERBOSE ] { 40 } - Constant [ integer SOCKOPT_ROUTER_MANDATORY ] { 33 } - Constant [ integer SOCKOPT_ROUTER_RAW ] { 41 } - Constant [ integer SOCKOPT_IPV6 ] { 42 } - Constant [ integer SOCKOPT_PLAIN_SERVER ] { 44 } - Constant [ integer SOCKOPT_PLAIN_USERNAME ] { 45 } - Constant [ integer SOCKOPT_PLAIN_PASSWORD ] { 46 } - Constant [ integer SOCKOPT_CURVE_SERVER ] { 47 } - Constant [ integer SOCKOPT_CURVE_PUBLICKEY ] { 48 } - Constant [ integer SOCKOPT_CURVE_SECRETKEY ] { 49 } - Constant [ integer SOCKOPT_CURVE_SERVERKEY ] { 50 } - Constant [ integer SOCKOPT_PROBE_ROUTER ] { 51 } - Constant [ integer SOCKOPT_REQ_CORRELATE ] { 52 } - Constant [ integer SOCKOPT_REQ_RELAXED ] { 53 } - Constant [ integer SOCKOPT_CONFLATE ] { 54 } - Constant [ integer SOCKOPT_ZAP_DOMAIN ] { 55 } - Constant [ integer CTXOPT_MAX_SOCKETS ] { 2 } - Constant [ integer CTXOPT_MAX_SOCKETS_DEFAULT ] { 1023 } + - Constants [122] { + Constant [ public int SOCKET_PAIR ] { 0 } + Constant [ public int SOCKET_PUB ] { 1 } + Constant [ public int SOCKET_SUB ] { 2 } + Constant [ public int SOCKET_REQ ] { 3 } + Constant [ public int SOCKET_REP ] { 4 } + Constant [ public int SOCKET_XREQ ] { 5 } + Constant [ public int SOCKET_XREP ] { 6 } + Constant [ public int SOCKET_PUSH ] { 8 } + Constant [ public int SOCKET_PULL ] { 7 } + Constant [ public int SOCKET_DEALER ] { 5 } + Constant [ public int SOCKET_ROUTER ] { 6 } + Constant [ public int SOCKET_XSUB ] { 10 } + Constant [ public int SOCKET_XPUB ] { 9 } + Constant [ public int SOCKET_STREAM ] { 11 } + Constant [ public int SOCKET_UPSTREAM ] { 7 } + Constant [ public int SOCKET_DOWNSTREAM ] { 8 } + Constant [ public int POLL_IN ] { 1 } + Constant [ public int POLL_OUT ] { 2 } + Constant [ public int MODE_SNDMORE ] { 2 } + Constant [ public int MODE_NOBLOCK ] { 1 } + Constant [ public int MODE_DONTWAIT ] { 1 } + Constant [ public int ERR_INTERNAL ] { -99 } + Constant [ public int ERR_EAGAIN ] { 11 } + Constant [ public int ERR_ENOTSUP ] { 95 } + Constant [ public int ERR_EFSM ] { 156384763 } + Constant [ public int ERR_ETERM ] { 156384765 } + Constant [ public string LIBZMQ_VER ] { 4.3.4 } + Constant [ public string LIBZMQ_VERSION ] { 4.3.4 } + Constant [ public int LIBZMQ_VERSION_ID ] { 40304 } + Constant [ public int LIBZMQ_VERSION_MAJOR ] { 4 } + Constant [ public int LIBZMQ_VERSION_MINOR ] { 3 } + Constant [ public int LIBZMQ_VERSION_PATCH ] { 4 } + Constant [ public int SOCKOPT_HEARTBEAT_IVL ] { 75 } + Constant [ public int SOCKOPT_HEARTBEAT_TTL ] { 76 } + Constant [ public int SOCKOPT_HEARTBEAT_TIMEOUT ] { 77 } + Constant [ public int SOCKOPT_USE_FD ] { 89 } + Constant [ public int SOCKOPT_XPUB_MANUAL ] { 71 } + Constant [ public int SOCKOPT_XPUB_WELCOME_MSG ] { 72 } + Constant [ public int SOCKOPT_STREAM_NOTIFY ] { 73 } + Constant [ public int SOCKOPT_INVERT_MATCHING ] { 74 } + Constant [ public int SOCKOPT_XPUB_VERBOSER ] { 78 } + Constant [ public int SOCKOPT_CONNECT_TIMEOUT ] { 79 } + Constant [ public int SOCKOPT_TCP_MAXRT ] { 80 } + Constant [ public int SOCKOPT_THREAD_SAFE ] { 81 } + Constant [ public int SOCKOPT_MULTICAST_MAXTPDU ] { 84 } + Constant [ public int SOCKOPT_VMCI_BUFFER_SIZE ] { 85 } + Constant [ public int SOCKOPT_VMCI_BUFFER_MIN_SIZE ] { 86 } + Constant [ public int SOCKOPT_VMCI_BUFFER_MAX_SIZE ] { 87 } + Constant [ public int SOCKOPT_VMCI_CONNECT_TIMEOUT ] { 88 } + Constant [ public int SOCKOPT_TOS ] { 57 } + Constant [ public int SOCKOPT_ROUTER_HANDOVER ] { 56 } + Constant [ public int SOCKOPT_CONNECT_RID ] { 61 } + Constant [ public int SOCKOPT_HANDSHAKE_IVL ] { 66 } + Constant [ public int SOCKOPT_SOCKS_PROXY ] { 68 } + Constant [ public int SOCKOPT_XPUB_NODROP ] { 69 } + Constant [ public int SOCKOPT_ROUTER_MANDATORY ] { 33 } + Constant [ public int SOCKOPT_PROBE_ROUTER ] { 51 } + Constant [ public int SOCKOPT_REQ_RELAXED ] { 53 } + Constant [ public int SOCKOPT_REQ_CORRELATE ] { 52 } + Constant [ public int SOCKOPT_CONFLATE ] { 54 } + Constant [ public int SOCKOPT_ZAP_DOMAIN ] { 55 } + Constant [ public int SOCKOPT_MECHANISM ] { 43 } + Constant [ public int SOCKOPT_PLAIN_SERVER ] { 44 } + Constant [ public int SOCKOPT_PLAIN_USERNAME ] { 45 } + Constant [ public int SOCKOPT_PLAIN_PASSWORD ] { 46 } + Constant [ public int SOCKOPT_CURVE_SERVER ] { 47 } + Constant [ public int SOCKOPT_CURVE_PUBLICKEY ] { 48 } + Constant [ public int SOCKOPT_CURVE_SECRETKEY ] { 49 } + Constant [ public int SOCKOPT_CURVE_SERVERKEY ] { 50 } + Constant [ public int SOCKOPT_GSSAPI_SERVER ] { 62 } + Constant [ public int SOCKOPT_GSSAPI_PLAINTEXT ] { 65 } + Constant [ public int SOCKOPT_GSSAPI_PRINCIPAL ] { 63 } + Constant [ public int SOCKOPT_GSSAPI_SERVICE_PRINCIPAL ] { 64 } + Constant [ public int SOCKOPT_IPV6 ] { 42 } + Constant [ public int SOCKOPT_IMMEDIATE ] { 39 } + Constant [ public int SOCKOPT_ROUTER_RAW ] { 41 } + Constant [ public int SOCKOPT_IPV4ONLY ] { 31 } + Constant [ public int SOCKOPT_DELAY_ATTACH_ON_CONNECT ] { 39 } + Constant [ public int SOCKOPT_TYPE ] { 16 } + Constant [ public int SOCKOPT_SNDHWM ] { 23 } + Constant [ public int SOCKOPT_RCVHWM ] { 24 } + Constant [ public int SOCKOPT_AFFINITY ] { 4 } + Constant [ public int SOCKOPT_SUBSCRIBE ] { 6 } + Constant [ public int SOCKOPT_UNSUBSCRIBE ] { 7 } + Constant [ public int SOCKOPT_IDENTITY ] { 5 } + Constant [ public int SOCKOPT_RATE ] { 8 } + Constant [ public int SOCKOPT_RECOVERY_IVL ] { 9 } + Constant [ public int SOCKOPT_SNDBUF ] { 11 } + Constant [ public int SOCKOPT_RCVBUF ] { 12 } + Constant [ public int SOCKOPT_LINGER ] { 17 } + Constant [ public int SOCKOPT_RECONNECT_IVL ] { 18 } + Constant [ public int SOCKOPT_RECONNECT_IVL_MAX ] { 21 } + Constant [ public int SOCKOPT_BACKLOG ] { 19 } + Constant [ public int SOCKOPT_MAXMSGSIZE ] { 22 } + Constant [ public int SOCKOPT_MULTICAST_HOPS ] { 25 } + Constant [ public int SOCKOPT_RCVTIMEO ] { 27 } + Constant [ public int SOCKOPT_SNDTIMEO ] { 28 } + Constant [ public int SOCKOPT_XPUB_VERBOSE ] { 40 } + Constant [ public int SOCKOPT_TCP_KEEPALIVE ] { 34 } + Constant [ public int SOCKOPT_TCP_KEEPALIVE_IDLE ] { 36 } + Constant [ public int SOCKOPT_TCP_KEEPALIVE_CNT ] { 35 } + Constant [ public int SOCKOPT_TCP_KEEPALIVE_INTVL ] { 37 } + Constant [ public int SOCKOPT_TCP_ACCEPT_FILTER ] { 38 } + Constant [ public int SOCKOPT_RCVMORE ] { 13 } + Constant [ public int SOCKOPT_FD ] { 14 } + Constant [ public int SOCKOPT_EVENTS ] { 15 } + Constant [ public int SOCKOPT_LAST_ENDPOINT ] { 32 } + Constant [ public int SOCKOPT_HWM ] { 2001 } + Constant [ public int CTXOPT_MAX_SOCKETS ] { 2 } + Constant [ public int CTXOPT_MAX_SOCKETS_DEFAULT ] { 1023 } + Constant [ public int EVENT_CONNECTED ] { 1 } + Constant [ public int EVENT_CONNECT_DELAYED ] { 2 } + Constant [ public int EVENT_CONNECT_RETRIED ] { 4 } + Constant [ public int EVENT_LISTENING ] { 8 } + Constant [ public int EVENT_BIND_FAILED ] { 16 } + Constant [ public int EVENT_ACCEPTED ] { 32 } + Constant [ public int EVENT_ACCEPT_FAILED ] { 64 } + Constant [ public int EVENT_CLOSED ] { 128 } + Constant [ public int EVENT_CLOSE_FAILED ] { 256 } + Constant [ public int EVENT_DISCONNECTED ] { 512 } + Constant [ public int EVENT_MONITOR_STOPPED ] { 1024 } + Constant [ public int EVENT_ALL ] { 65535 } } - Static properties [0] { } - - Static methods [1] { + - Static methods [4] { Method [ <internal:zmq> static public method clock ] { - Parameters [0] { } } + + Method [ <internal:zmq> static public method z85encode ] { + + - Parameters [1] { + Parameter #0 [ <required> $data ] + } + } + + Method [ <internal:zmq> static public method z85decode ] { + + - Parameters [1] { + Parameter #0 [ <required> $data ] + } + } + + Method [ <internal:zmq> static public method curvekeypair ] { + + - Parameters [0] { + } + } } - Properties [0] { @@ -115,18 +179,29 @@ Extension [ <persistent> extension #193 zmq version 1.1.3 ] { - Static properties [0] { } - - Static methods [0] { + - Static methods [1] { + Method [ <internal:zmq> static public method acquire ] { + + - Parameters [0] { + } + } } - Properties [0] { } - - Methods [6] { + - Methods [7] { Method [ <internal:zmq, ctor> final public method __construct ] { - Parameters [2] { - Parameter #0 [ <optional> $io_threads ] - Parameter #1 [ <optional> $persistent ] + Parameter #0 [ <optional> $io_threads = <default> ] + Parameter #1 [ <optional> $persistent = <default> ] + } + } + + Method [ <internal:zmq> public method getsocketcount ] { + + - Parameters [0] { } } @@ -135,7 +210,7 @@ Extension [ <persistent> extension #193 zmq version 1.1.3 ] { - Parameters [3] { Parameter #0 [ <required> $type ] Parameter #1 [ <required> $dsn ] - Parameter #2 [ <optional> $on_new_socket ] + Parameter #2 [ <optional> $on_new_socket = <default> ] } } @@ -182,14 +257,14 @@ Extension [ <persistent> extension #193 zmq version 1.1.3 ] { - Properties [0] { } - - Methods [18] { + - Methods [20] { Method [ <internal:zmq, ctor> final public method __construct ] { - Parameters [4] { Parameter #0 [ <required> ZMQContext $ZMQContext ] Parameter #1 [ <required> $type ] - Parameter #2 [ <optional> $persistent_id ] - Parameter #3 [ <optional> $on_new_socket ] + Parameter #2 [ <optional> $persistent_id = <default> ] + Parameter #3 [ <optional> $on_new_socket = <default> ] } } @@ -197,14 +272,14 @@ Extension [ <persistent> extension #193 zmq version 1.1.3 ] { - Parameters [2] { Parameter #0 [ <required> $message ] - Parameter #1 [ <optional> $mode ] + Parameter #1 [ <optional> $mode = <default> ] } } Method [ <internal:zmq> public method recv ] { - Parameters [1] { - Parameter #0 [ <optional> $mode ] + Parameter #0 [ <optional> $mode = <default> ] } } @@ -212,14 +287,14 @@ Extension [ <persistent> extension #193 zmq version 1.1.3 ] { - Parameters [2] { Parameter #0 [ <required> $message ] - Parameter #1 [ <optional> $mode ] + Parameter #1 [ <optional> $mode = <default> ] } } Method [ <internal:zmq> public method recvmulti ] { - Parameters [1] { - Parameter #0 [ <optional> $mode ] + Parameter #0 [ <optional> $mode = <default> ] } } @@ -227,7 +302,7 @@ Extension [ <persistent> extension #193 zmq version 1.1.3 ] { - Parameters [2] { Parameter #0 [ <required> $dsn ] - Parameter #1 [ <optional> $force ] + Parameter #1 [ <optional> $force = <default> ] } } @@ -235,7 +310,22 @@ Extension [ <persistent> extension #193 zmq version 1.1.3 ] { - Parameters [2] { Parameter #0 [ <required> $dsn ] - Parameter #1 [ <optional> $force ] + Parameter #1 [ <optional> $force = <default> ] + } + } + + Method [ <internal:zmq> public method monitor ] { + + - Parameters [2] { + Parameter #0 [ <required> $dsn ] + Parameter #1 [ <optional> $events = <default> ] + } + } + + Method [ <internal:zmq> public method recvevent ] { + + - Parameters [1] { + Parameter #0 [ <optional> $flags = <default> ] } } @@ -302,14 +392,14 @@ Extension [ <persistent> extension #193 zmq version 1.1.3 ] { - Parameters [2] { Parameter #0 [ <required> $message ] - Parameter #1 [ <optional> $mode ] + Parameter #1 [ <optional> $mode = <default> ] } } Method [ <internal:zmq> public method recvmsg ] { - Parameters [1] { - Parameter #0 [ <optional> $mode ] + Parameter #0 [ <optional> $mode = <default> ] } } } @@ -329,7 +419,7 @@ Extension [ <persistent> extension #193 zmq version 1.1.3 ] { - Properties [0] { } - - Methods [7] { + - Methods [8] { Method [ <internal:zmq> public method add ] { - Parameters [2] { @@ -343,7 +433,7 @@ Extension [ <persistent> extension #193 zmq version 1.1.3 ] { - Parameters [3] { Parameter #0 [ <required> &$readable ] Parameter #1 [ <required> &$writable ] - Parameter #2 [ <optional> $timeout ] + Parameter #2 [ <optional> $timeout = <default> ] } } @@ -372,6 +462,12 @@ Extension [ <persistent> extension #193 zmq version 1.1.3 ] { } } + Method [ <internal:zmq> public method items ] { + + - Parameters [0] { + } + } + Method [ <internal:zmq> final private method __clone ] { - Parameters [0] { @@ -400,7 +496,7 @@ Extension [ <persistent> extension #193 zmq version 1.1.3 ] { - Parameters [3] { Parameter #0 [ <required> ZMQSocket $frontend ] Parameter #1 [ <required> ZMQSocket $backend ] - Parameter #2 [ <optional> ZMQSocket $capture ] + Parameter #2 [ <optional> ZMQSocket $capture = <default> ] } } @@ -415,7 +511,7 @@ Extension [ <persistent> extension #193 zmq version 1.1.3 ] { - Parameters [3] { Parameter #0 [ <required> $idle_callback ] Parameter #1 [ <required> $timeout ] - Parameter #2 [ <optional> $user_data ] + Parameter #2 [ <optional> $user_data = <default> ] } } @@ -437,7 +533,7 @@ Extension [ <persistent> extension #193 zmq version 1.1.3 ] { - Parameters [3] { Parameter #0 [ <required> $idle_callback ] Parameter #1 [ <required> $timeout ] - Parameter #2 [ <optional> $user_data ] + Parameter #2 [ <optional> $user_data = <default> ] } } @@ -462,7 +558,7 @@ Extension [ <persistent> extension #193 zmq version 1.1.3 ] { } } - Class [ <internal:zmq> class ZMQException extends Exception ] { + Class [ <internal:zmq> class ZMQException extends Exception implements Throwable, Stringable ] { - Constants [0] { } @@ -474,52 +570,87 @@ Extension [ <persistent> extension #193 zmq version 1.1.3 ] { } - Properties [4] { - Property [ <default> protected $message ] - Property [ <default> protected $code ] - Property [ <default> protected $file ] - Property [ <default> protected $line ] + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected string $file = '' ] + Property [ protected int $line = 0 ] } - Methods [10] { - Method [ <internal:Core, inherits Exception, ctor> <visibility error> method __construct ] { + Method [ <internal:Core, inherits Exception, ctor> public method __construct ] { - Parameters [3] { - Parameter #0 [ <optional> $message ] - Parameter #1 [ <optional> $code ] - Parameter #2 [ <optional> $previous ] + Parameter #0 [ <optional> string $message = "" ] + Parameter #1 [ <optional> int $code = 0 ] + Parameter #2 [ <optional> ?Throwable $previous = null ] } } Method [ <internal:Core, inherits Exception> public method __wakeup ] { + + - Parameters [0] { + } + - Tentative return [ void ] } - Method [ <internal:Core, inherits Exception> final public method getMessage ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ <internal:Core, inherits Exception> final public method getCode ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getCode ] { + + - Parameters [0] { + } } - Method [ <internal:Core, inherits Exception> final public method getFile ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ <internal:Core, inherits Exception> final public method getLine ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } - Method [ <internal:Core, inherits Exception> final public method getTrace ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } - Method [ <internal:Core, inherits Exception> final public method getPrevious ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } - Method [ <internal:Core, inherits Exception> final public method getTraceAsString ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ <internal:Core, inherits Exception> public method __toString ] { + Method [ <internal:Core, inherits Exception, prototype Stringable> public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } - Class [ <internal:zmq> final class ZMQContextException extends ZMQException ] { + Class [ <internal:zmq> final class ZMQContextException extends ZMQException implements Stringable, Throwable ] { - Constants [0] { } @@ -531,52 +662,87 @@ Extension [ <persistent> extension #193 zmq version 1.1.3 ] { } - Properties [4] { - Property [ <default> protected $message ] - Property [ <default> protected $code ] - Property [ <default> protected $file ] - Property [ <default> protected $line ] + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected string $file = '' ] + Property [ protected int $line = 0 ] } - Methods [10] { - Method [ <internal:Core, inherits Exception, ctor> <visibility error> method __construct ] { + Method [ <internal:Core, inherits Exception, ctor> public method __construct ] { - Parameters [3] { - Parameter #0 [ <optional> $message ] - Parameter #1 [ <optional> $code ] - Parameter #2 [ <optional> $previous ] + Parameter #0 [ <optional> string $message = "" ] + Parameter #1 [ <optional> int $code = 0 ] + Parameter #2 [ <optional> ?Throwable $previous = null ] } } Method [ <internal:Core, inherits Exception> public method __wakeup ] { + + - Parameters [0] { + } + - Tentative return [ void ] } - Method [ <internal:Core, inherits Exception> final public method getMessage ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ <internal:Core, inherits Exception> final public method getCode ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getCode ] { + + - Parameters [0] { + } } - Method [ <internal:Core, inherits Exception> final public method getFile ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ <internal:Core, inherits Exception> final public method getLine ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } - Method [ <internal:Core, inherits Exception> final public method getTrace ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } - Method [ <internal:Core, inherits Exception> final public method getPrevious ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } - Method [ <internal:Core, inherits Exception> final public method getTraceAsString ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ <internal:Core, inherits Exception> public method __toString ] { + Method [ <internal:Core, inherits Exception, prototype Stringable> public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } - Class [ <internal:zmq> final class ZMQSocketException extends ZMQException ] { + Class [ <internal:zmq> final class ZMQSocketException extends ZMQException implements Stringable, Throwable ] { - Constants [0] { } @@ -588,52 +754,87 @@ Extension [ <persistent> extension #193 zmq version 1.1.3 ] { } - Properties [4] { - Property [ <default> protected $message ] - Property [ <default> protected $code ] - Property [ <default> protected $file ] - Property [ <default> protected $line ] + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected string $file = '' ] + Property [ protected int $line = 0 ] } - Methods [10] { - Method [ <internal:Core, inherits Exception, ctor> <visibility error> method __construct ] { + Method [ <internal:Core, inherits Exception, ctor> public method __construct ] { - Parameters [3] { - Parameter #0 [ <optional> $message ] - Parameter #1 [ <optional> $code ] - Parameter #2 [ <optional> $previous ] + Parameter #0 [ <optional> string $message = "" ] + Parameter #1 [ <optional> int $code = 0 ] + Parameter #2 [ <optional> ?Throwable $previous = null ] } } Method [ <internal:Core, inherits Exception> public method __wakeup ] { + + - Parameters [0] { + } + - Tentative return [ void ] } - Method [ <internal:Core, inherits Exception> final public method getMessage ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ <internal:Core, inherits Exception> final public method getCode ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getCode ] { + + - Parameters [0] { + } } - Method [ <internal:Core, inherits Exception> final public method getFile ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ <internal:Core, inherits Exception> final public method getLine ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } - Method [ <internal:Core, inherits Exception> final public method getTrace ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } - Method [ <internal:Core, inherits Exception> final public method getPrevious ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } - Method [ <internal:Core, inherits Exception> final public method getTraceAsString ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ <internal:Core, inherits Exception> public method __toString ] { + Method [ <internal:Core, inherits Exception, prototype Stringable> public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } - Class [ <internal:zmq> final class ZMQPollException extends ZMQException ] { + Class [ <internal:zmq> final class ZMQPollException extends ZMQException implements Stringable, Throwable ] { - Constants [0] { } @@ -645,52 +846,87 @@ Extension [ <persistent> extension #193 zmq version 1.1.3 ] { } - Properties [4] { - Property [ <default> protected $message ] - Property [ <default> protected $code ] - Property [ <default> protected $file ] - Property [ <default> protected $line ] + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected string $file = '' ] + Property [ protected int $line = 0 ] } - Methods [10] { - Method [ <internal:Core, inherits Exception, ctor> <visibility error> method __construct ] { + Method [ <internal:Core, inherits Exception, ctor> public method __construct ] { - Parameters [3] { - Parameter #0 [ <optional> $message ] - Parameter #1 [ <optional> $code ] - Parameter #2 [ <optional> $previous ] + Parameter #0 [ <optional> string $message = "" ] + Parameter #1 [ <optional> int $code = 0 ] + Parameter #2 [ <optional> ?Throwable $previous = null ] } } Method [ <internal:Core, inherits Exception> public method __wakeup ] { + + - Parameters [0] { + } + - Tentative return [ void ] } - Method [ <internal:Core, inherits Exception> final public method getMessage ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ <internal:Core, inherits Exception> final public method getCode ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getCode ] { + + - Parameters [0] { + } } - Method [ <internal:Core, inherits Exception> final public method getFile ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ <internal:Core, inherits Exception> final public method getLine ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } - Method [ <internal:Core, inherits Exception> final public method getTrace ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } - Method [ <internal:Core, inherits Exception> final public method getPrevious ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } - Method [ <internal:Core, inherits Exception> final public method getTraceAsString ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ <internal:Core, inherits Exception> public method __toString ] { + Method [ <internal:Core, inherits Exception, prototype Stringable> public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } - Class [ <internal:zmq> final class ZMQDeviceException extends ZMQException ] { + Class [ <internal:zmq> final class ZMQDeviceException extends ZMQException implements Stringable, Throwable ] { - Constants [0] { } @@ -702,47 +938,82 @@ Extension [ <persistent> extension #193 zmq version 1.1.3 ] { } - Properties [4] { - Property [ <default> protected $message ] - Property [ <default> protected $code ] - Property [ <default> protected $file ] - Property [ <default> protected $line ] + Property [ protected $message = '' ] + Property [ protected $code = 0 ] + Property [ protected string $file = '' ] + Property [ protected int $line = 0 ] } - Methods [10] { - Method [ <internal:Core, inherits Exception, ctor> <visibility error> method __construct ] { + Method [ <internal:Core, inherits Exception, ctor> public method __construct ] { - Parameters [3] { - Parameter #0 [ <optional> $message ] - Parameter #1 [ <optional> $code ] - Parameter #2 [ <optional> $previous ] + Parameter #0 [ <optional> string $message = "" ] + Parameter #1 [ <optional> int $code = 0 ] + Parameter #2 [ <optional> ?Throwable $previous = null ] } } Method [ <internal:Core, inherits Exception> public method __wakeup ] { + + - Parameters [0] { + } + - Tentative return [ void ] } - Method [ <internal:Core, inherits Exception> final public method getMessage ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ <internal:Core, inherits Exception> final public method getCode ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getCode ] { + + - Parameters [0] { + } } - Method [ <internal:Core, inherits Exception> final public method getFile ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getFile ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ <internal:Core, inherits Exception> final public method getLine ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getLine ] { + + - Parameters [0] { + } + - Return [ int ] } - Method [ <internal:Core, inherits Exception> final public method getTrace ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTrace ] { + + - Parameters [0] { + } + - Return [ array ] } - Method [ <internal:Core, inherits Exception> final public method getPrevious ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getPrevious ] { + + - Parameters [0] { + } + - Return [ ?Throwable ] } - Method [ <internal:Core, inherits Exception> final public method getTraceAsString ] { + Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTraceAsString ] { + + - Parameters [0] { + } + - Return [ string ] } - Method [ <internal:Core, inherits Exception> public method __toString ] { + Method [ <internal:Core, inherits Exception, prototype Stringable> public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] } } } diff --git a/php-pecl-zmq.spec b/php-pecl-zmq.spec index 752ddf3..b06f407 100644 --- a/php-pecl-zmq.spec +++ b/php-pecl-zmq.spec @@ -3,98 +3,56 @@ # # Fedora spec file for php-pecl-zmq # -# Copyright (c) 2013-2019 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2013-2023 Remi Collet +# License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -%if 0%{?scl:1} -%global sub_prefix %{scl_prefix} -%scl_package php-pecl-zmq -%endif +%{?scl:%scl_package php-pecl-zmq} + +%bcond_without tests %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global pecl_name zmq -%global with_tests %{?_without_tests:0}%{!?_without_tests:1} %if "%{php_version}" < "5.6" %global ini_name %{pecl_name}.ini %else %global ini_name 40-%{pecl_name}.ini %endif +%global sources %{pecl_name}-%{version} +%global _configure ../%{sources}/configure Summary: ZeroMQ messaging -Name: %{?sub_prefix}php-pecl-%{pecl_name} +Name: %{?scl_prefix}php-pecl-%{pecl_name} Version: 1.1.3 -Release: 10%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} -License: BSD -URL: http://pecl.php.net/package/%{pecl_name} -Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz +Release: 18%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +License: BSD-3-Clause +URL: https://pecl.php.net/package/%{pecl_name} +Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz -Patch0: https://patch-diff.githubusercontent.com/raw/mkoppanen/php-zmq/pull/170.patch -Patch1: https://patch-diff.githubusercontent.com/raw/mkoppanen/php-zmq/pull/195.patch +Patch0: https://patch-diff.githubusercontent.com/raw/zeromq/php-zmq/pull/216.patch +Patch1: https://patch-diff.githubusercontent.com/raw/zeromq/php-zmq/pull/222.patch +Patch2: https://patch-diff.githubusercontent.com/raw/zeromq/php-zmq/pull/228.patch +BuildRequires: make BuildRequires: %{?dtsprefix}gcc -# see https://github.com/mkoppanen/php-zmq/pull/190 build ok bug segfaults BuildRequires: %{?scl_prefix}php-devel BuildRequires: %{?scl_prefix}php-pear -%if 0%{?fedora} >= 22 || 0%{?rhel} >= 7 -# v4 in Fedora22+, EPEL-7 BuildRequires: zeromq-devel >= 2.0.7 -%else -BuildRequires: zeromq3-devel -%endif BuildRequires: pkgconfig +# BuildRequires: gdb php-debuginfo php-cli-debuginfo php-debugsource Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} -%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} # Version 1.0.7 is the first pecl release # Fedora/EPEL still provides php-zmq, not php-pecl-zmq -Obsoletes: %{?scl_prefix}php-%{pecl_name} < %{version} -Provides: %{?scl_prefix}php-%{pecl_name} = %{version} -Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} +Obsoletes: %{?scl_prefix}php-%{pecl_name} < %{version}-99 +Provides: %{?scl_prefix}php-%{pecl_name} = %{version}-99 +Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}-99 Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} -%if "%{?scl_prefix}" != "%{?sub_prefix}" -Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} -Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} -%endif - -%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} -# Other third party repo stuff -%if "%{php_version}" > "5.6" -Obsoletes: php56u-pecl-%{pecl_name} <= %{version} -Obsoletes: php56w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.0" -Obsoletes: php70u-pecl-%{pecl_name} <= %{version} -Obsoletes: php70w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.1" -Obsoletes: php71u-pecl-%{pecl_name} <= %{version} -Obsoletes: php71w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.2" -Obsoletes: php72u-pecl-%{pecl_name} <= %{version} -Obsoletes: php72w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.3" -Obsoletes: php73-pecl-%{pecl_name} <= %{version} -Obsoletes: php73w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.4" -Obsoletes: php74-pecl-%{pecl_name} <= %{version} -Obsoletes: php74w-pecl-%{pecl_name} <= %{version} -%endif -%endif - -%if 0%{?fedora} < 20 && 0%{?rhel} < 7 -# Filter shared private -%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} -%{?filter_setup} -%endif %description @@ -112,11 +70,10 @@ sed -e 's/role="test"/role="src"/' \ %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ -i package.xml -mv %{pecl_name}-%{version} NTS - -cd NTS -%patch0 -p1 -b .pr170 -%patch1 -p1 -b .pr195 +cd %{sources} +%patch -P0 -p1 -b .pr216 +%patch -P1 -p1 -b .pr222 +%patch -P2 -p1 -b .pr228 if pkg-config libzmq --atleast-version=4 then @@ -134,9 +91,9 @@ if test "x${extver}" != "x%{version}"; then fi cd .. +mkdir NTS %if %{with_zts} -# Duplicate source tree for NTS / ZTS build -cp -pr NTS ZTS +mkdir ZTS %endif # Create configuration file @@ -149,21 +106,22 @@ EOF %build %{?dtsenable} -cd NTS -%{_bindir}/phpize +cd %{sources} +%{__phpize} + +cd ../NTS %configure \ --with-zmq \ --with-libdir=%{_lib} \ - --with-php-config=%{_bindir}/php-config + --with-php-config=%{__phpconfig} make %{?_smp_mflags} %if %{with_zts} cd ../ZTS -%{_bindir}/zts-phpize %configure \ --with-zmq \ --with-libdir=%{_lib} \ - --with-php-config=%{_bindir}/zts-php-config + --with-php-config=%{__ztsphpconfig} make %{?_smp_mflags} %endif @@ -189,7 +147,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} # Documentation for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i +do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done @@ -214,39 +172,38 @@ fi %check -cd NTS +cd %{sources} + : Minimal load test for NTS extension %{__php} --no-php-ini \ - --define extension=%{buildroot}/%{php_extdir}/%{pecl_name}.so \ - --modules | grep %{pecl_name} + --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ + --modules | grep '^%{pecl_name}$' -%if %{with_tests} +%if %{with tests} : upstream test suite for NTS extension -export TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" +export TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" export REPORT_EXIT_STATUS=1 -export NO_INTERACTION=1 export TEST_PHP_EXECUTABLE=%{__php} -%{__php} -n run-tests.php --show-diff +%{__php} -n run-tests.php -q --show-diff %endif %if %{with_zts} -cd ../ZTS : Minimal load test for ZTS extension %{__ztsphp} --no-php-ini \ - --define extension=%{buildroot}/%{php_ztsextdir}/%{pecl_name}.so \ - --modules | grep %{pecl_name} + --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ + --modules | grep '^%{pecl_name}$' -%if %{with_tests} +%if %{with tests} : upstream test suite for ZTS extension -export TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" +export TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" export TEST_PHP_EXECUTABLE=%{__ztsphp} -%{__ztsphp} -n run-tests.php --show-diff +%{__ztsphp} -n run-tests.php -q --show-diff %endif %endif %files -%{?_licensedir:%license NTS/LICENSE} +%{?_licensedir:%license %{sources}/LICENSE} %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -260,6 +217,30 @@ export TEST_PHP_EXECUTABLE=%{__ztsphp} %changelog +* Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 1.1.3-18 +- rebuild for PHP 8.3.0RC1 + +* Thu Jul 20 2023 Remi Collet <remi@remirepo.net> - 1.1.3-17 +- build out of sources tree + +* Fri Jun 17 2022 Remi Collet <remi@remirepo.net> - 1.1.3-16 +- add patch for PHP 8.2 from https://github.com/zeromq/php-zmq/pull/228 + +* Wed Nov 3 2021 Remi Collet <remi@remirepo.net> - 1.1.3-15 +- add patch for PHP 8.1 from https://github.com/zeromq/php-zmq/pull/222 + +* Wed Sep 30 2020 Remi Collet <remi@remirepo.net> - 1.1.3-14 +- rebuild for PHP 8.0.0RC1 + +* Wed Sep 2 2020 Remi Collet <remi@remirepo.net> - 1.1.3-13 +- rebuild for PHP 8.0.0beta3 + +* Mon Aug 24 2020 Remi Collet <remi@remirepo.net> - 1.1.3-12 +- add patch for PHP 8 from https://github.com/zeromq/php-zmq/pull/216 + +* Wed Nov 27 2019 Remi Collet <remi@remirepo.net> - 1.1.3-11 +- EL-8 rebuild + * Tue Sep 03 2019 Remi Collet <remi@remirepo.net> - 1.1.3-10 - rebuild for 7.4.0RC1 |