All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 01/11] package/php-amqp: bump version to 1.10.2
@ 2021-06-29 16:50 Adam Duskett
  2021-06-29 16:50 ` [Buildroot] [PATCH 02/11] package/php-gnupg: bump version to 1.5.0 Adam Duskett
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Adam Duskett @ 2021-06-29 16:50 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
 package/php-amqp/php-amqp.hash | 4 ++--
 package/php-amqp/php-amqp.mk   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/php-amqp/php-amqp.hash b/package/php-amqp/php-amqp.hash
index c061efabb9..bce8ac0c9a 100644
--- a/package/php-amqp/php-amqp.hash
+++ b/package/php-amqp/php-amqp.hash
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256 b66b8b8264749cb7a69ae4d09665dad1559b6c4f01430206c8e4187bcd8c782d  amqp-1.9.4.tgz
-sha256 ecd004e9ae3fcf54896b562d5e8008e36041f2620076effd58e5f4187299cee8  LICENSE
+sha256  0ebc61052eb12406dddf5eabfe8749a12d52c566816b8aab04fb9916d0c26ed2  amqp-1.10.2.tgz
+sha256  ecd004e9ae3fcf54896b562d5e8008e36041f2620076effd58e5f4187299cee8  LICENSE
diff --git a/package/php-amqp/php-amqp.mk b/package/php-amqp/php-amqp.mk
index c808ecdbd6..981f8274a9 100644
--- a/package/php-amqp/php-amqp.mk
+++ b/package/php-amqp/php-amqp.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-PHP_AMQP_VERSION = 1.9.4
+PHP_AMQP_VERSION = 1.10.2
 PHP_AMQP_SOURCE = amqp-$(PHP_AMQP_VERSION).tgz
 PHP_AMQP_SITE = https://pecl.php.net/get
 PHP_AMQP_CONF_OPTS = --with-php-config=$(STAGING_DIR)/usr/bin/php-config \
-- 
2.31.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 02/11] package/php-gnupg: bump version to 1.5.0
  2021-06-29 16:50 [Buildroot] [PATCH 01/11] package/php-amqp: bump version to 1.10.2 Adam Duskett
@ 2021-06-29 16:50 ` Adam Duskett
  2021-06-29 16:50 ` [Buildroot] [PATCH 03/11] package/php-imagick: bump version to 3.5.0 Adam Duskett
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Adam Duskett @ 2021-06-29 16:50 UTC (permalink / raw)
  To: buildroot

Other changes:
  - Change --with-gnupg=$(STAGING_DIR)/usr/include to
  --with-gnupg=$(STAGING_DIR)/usr as the make system appends /include to the
    gnupgp path now.

Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
 package/php-gnupg/php-gnupg.hash | 2 +-
 package/php-gnupg/php-gnupg.mk   | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/php-gnupg/php-gnupg.hash b/package/php-gnupg/php-gnupg.hash
index 8d142cdaaf..99ffe87f46 100644
--- a/package/php-gnupg/php-gnupg.hash
+++ b/package/php-gnupg/php-gnupg.hash
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  35e16bee11345a7d6bf57bea3cadf45e371ad1ed4e0218b0c06f6f637e4e1772  gnupg-1.4.0.tgz
+sha256  d4f5f79aa483908f3df08e5b343ea3593c6d725b9ed2103e30242627659e0a64  gnupg-1.5.0.tgz
 sha256  da1136d4d9326317cbd320dadddf7e9b4b4edffd973eb083cb7b9754fb6a15d9  LICENSE
diff --git a/package/php-gnupg/php-gnupg.mk b/package/php-gnupg/php-gnupg.mk
index ae0a781154..a89f0978af 100644
--- a/package/php-gnupg/php-gnupg.mk
+++ b/package/php-gnupg/php-gnupg.mk
@@ -4,13 +4,13 @@
 #
 ################################################################################
 
-PHP_GNUPG_VERSION = 1.4.0
+PHP_GNUPG_VERSION = 1.5.0
 PHP_GNUPG_SOURCE = gnupg-$(PHP_GNUPG_VERSION).tgz
 PHP_GNUPG_SITE = https://pecl.php.net/get
 # phpize does the autoconf magic
 PHP_GNUPG_DEPENDENCIES = php libgpgme host-autoconf host-pkgconf
 PHP_GNUPG_CONF_OPTS = --with-php-config=$(STAGING_DIR)/usr/bin/php-config \
-	--with-gnupg=$(STAGING_DIR)/usr/include --with-gpg=/usr/bin/gpg
+	--with-gnupg=$(STAGING_DIR)/usr --with-gpg=/usr/bin/gpg
 PHP_GNUPG_LICENSE = BSD-2-Clause
 PHP_GNUPG_LICENSE_FILES = LICENSE
 
-- 
2.31.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 03/11] package/php-imagick: bump version to 3.5.0
  2021-06-29 16:50 [Buildroot] [PATCH 01/11] package/php-amqp: bump version to 1.10.2 Adam Duskett
  2021-06-29 16:50 ` [Buildroot] [PATCH 02/11] package/php-gnupg: bump version to 1.5.0 Adam Duskett
@ 2021-06-29 16:50 ` Adam Duskett
  2021-06-29 16:50 ` [Buildroot] [PATCH 04/11] package/php-memcached: bump version to 3.1.5 Adam Duskett
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Adam Duskett @ 2021-06-29 16:50 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
 package/php-imagick/php-imagick.hash | 2 +-
 package/php-imagick/php-imagick.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/php-imagick/php-imagick.hash b/package/php-imagick/php-imagick.hash
index 8b62ed1d9a..e915808585 100644
--- a/package/php-imagick/php-imagick.hash
+++ b/package/php-imagick/php-imagick.hash
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  1f3c5b5eeaa02800ad22f506cd100e8889a66b2ec937e192eaaa30d74562567c  imagick-3.4.3.tgz
+sha256  795db7c36fbacd3d33a4f53ff2d38584c846e80a04dcd04c55e9e46c28f5d229  imagick-3.5.0.tgz
 sha256  b6e00df9cb3b91977c0d64a7c4db48cb6f5041f6eeda6583c236775f70a35b78  LICENSE
diff --git a/package/php-imagick/php-imagick.mk b/package/php-imagick/php-imagick.mk
index 6fb43de0ca..2dc055f0b3 100644
--- a/package/php-imagick/php-imagick.mk
+++ b/package/php-imagick/php-imagick.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-PHP_IMAGICK_VERSION = 3.4.3
+PHP_IMAGICK_VERSION = 3.5.0
 PHP_IMAGICK_SOURCE = imagick-$(PHP_IMAGICK_VERSION).tgz
 PHP_IMAGICK_SITE = http://pecl.php.net/get
 PHP_IMAGICK_CONF_OPTS = --with-php-config=$(STAGING_DIR)/usr/bin/php-config \
-- 
2.31.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 04/11] package/php-memcached: bump version to 3.1.5
  2021-06-29 16:50 [Buildroot] [PATCH 01/11] package/php-amqp: bump version to 1.10.2 Adam Duskett
  2021-06-29 16:50 ` [Buildroot] [PATCH 02/11] package/php-gnupg: bump version to 1.5.0 Adam Duskett
  2021-06-29 16:50 ` [Buildroot] [PATCH 03/11] package/php-imagick: bump version to 3.5.0 Adam Duskett
@ 2021-06-29 16:50 ` Adam Duskett
  2021-06-29 16:50 ` [Buildroot] [PATCH 05/11] package/php-ssh2: bump version to 1.3.1 Adam Duskett
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Adam Duskett @ 2021-06-29 16:50 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
 package/php-memcached/php-memcached.hash | 8 ++++----
 package/php-memcached/php-memcached.mk   | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/package/php-memcached/php-memcached.hash b/package/php-memcached/php-memcached.hash
index dd294f466a..7e918c17f6 100644
--- a/package/php-memcached/php-memcached.hash
+++ b/package/php-memcached/php-memcached.hash
@@ -1,5 +1,5 @@
 # Locally calculated
-sha256 20786213ff92cd7ebdb0d0ac10dde1e9580a2f84296618b666654fd76ea307d4  memcached-3.1.3.tgz
-sha256 24e8e3a9529204ead9422fa17cf3ddd75d292a8763b87fdb20591964f2e6ebe0  LICENSE
-sha256 a453a7a272fbd24105b39959f76996d50dad80b22d1c310f6c67f74f62ae4054  fastlz/LICENSE
-sha256 bba8cb50c660842c5ca459c5004395bdef8f01c1b64f97a9978f1053f173cb82  g_fmt.h
+sha256  b288e45f839593e16c4d8508b241de51a86df4f7322153e6becb9e1c819021fd  memcached-3.1.5.tgz
+sha256  24e8e3a9529204ead9422fa17cf3ddd75d292a8763b87fdb20591964f2e6ebe0  LICENSE
+sha256  a453a7a272fbd24105b39959f76996d50dad80b22d1c310f6c67f74f62ae4054  fastlz/LICENSE
+sha256  bba8cb50c660842c5ca459c5004395bdef8f01c1b64f97a9978f1053f173cb82  g_fmt.h
diff --git a/package/php-memcached/php-memcached.mk b/package/php-memcached/php-memcached.mk
index 4607d099f3..068fbb786b 100644
--- a/package/php-memcached/php-memcached.mk
+++ b/package/php-memcached/php-memcached.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-PHP_MEMCACHED_VERSION = 3.1.3
+PHP_MEMCACHED_VERSION = 3.1.5
 PHP_MEMCACHED_SOURCE = memcached-$(PHP_MEMCACHED_VERSION).tgz
 PHP_MEMCACHED_SITE = https://pecl.php.net/get
 PHP_MEMCACHED_CONF_OPTS = --with-php-config=$(STAGING_DIR)/usr/bin/php-config \
-- 
2.31.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 05/11] package/php-ssh2: bump version to 1.3.1
  2021-06-29 16:50 [Buildroot] [PATCH 01/11] package/php-amqp: bump version to 1.10.2 Adam Duskett
                   ` (2 preceding siblings ...)
  2021-06-29 16:50 ` [Buildroot] [PATCH 04/11] package/php-memcached: bump version to 3.1.5 Adam Duskett
@ 2021-06-29 16:50 ` Adam Duskett
  2021-06-29 16:50 ` [Buildroot] [PATCH 06/11] package/php-xdebug: bump version to 3.0.4 Adam Duskett
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Adam Duskett @ 2021-06-29 16:50 UTC (permalink / raw)
  To: buildroot

Other changes:
  - Remove both upstream patches

Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
 ...fix-php_url-fields-usage-for-PHP-7-3.patch | 302 -------
 ...estored-commented-reference-counting.patch | 746 ------------------
 package/php-ssh2/php-ssh2.hash                |   2 +-
 package/php-ssh2/php-ssh2.mk                  |   2 +-
 4 files changed, 2 insertions(+), 1050 deletions(-)
 delete mode 100644 package/php-ssh2/0001-fix-php_url-fields-usage-for-PHP-7-3.patch
 delete mode 100644 package/php-ssh2/0002-dstogov-Fixed-PHP7-port-Restored-commented-reference-counting.patch

diff --git a/package/php-ssh2/0001-fix-php_url-fields-usage-for-PHP-7-3.patch b/package/php-ssh2/0001-fix-php_url-fields-usage-for-PHP-7-3.patch
deleted file mode 100644
index afc5de9915..0000000000
--- a/package/php-ssh2/0001-fix-php_url-fields-usage-for-PHP-7-3.patch
+++ /dev/null
@@ -1,302 +0,0 @@
-From a8835aab2c15e794fce13bd927295719e384ad2d Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@php.net>
-Date: Thu, 28 Jun 2018 07:10:35 +0200
-Subject: [PATCH] fix php_url fields usage for PHP 7.3
-
-Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-[Retrieved from:
-https://github.com/php/pecl-networking-ssh2/commit/a8835aab2c15e794fce13bd927295719e384ad2d]
----
- php_ssh2.h            |  8 +++++++
- ssh2_fopen_wrappers.c | 55 +++++++++++++++++++++++++++----------------
- ssh2_sftp.c           | 20 ++++++++--------
- 3 files changed, 53 insertions(+), 30 deletions(-)
-
-diff --git a/php_ssh2.h b/php_ssh2.h
-index 734b795..d010ff9 100644
---- a/php_ssh2.h
-+++ b/php_ssh2.h
-@@ -166,6 +166,14 @@ extern php_stream_wrapper php_ssh2_sftp_wrapper;
- extern int le_ssh2_session;
- extern int le_ssh2_sftp;
- 
-+#if PHP_VERSION_ID < 70300
-+#define SSH2_URL_STR(a) (a)
-+#define SSH2_URL_LEN(a) strlen(a)
-+#else
-+#define SSH2_URL_STR(a) ZSTR_VAL(a)
-+#define SSH2_URL_LEN(a) ZSTR_LEN(a)
-+#endif
-+
- #endif	/* PHP_SSH2_H */
- 
- /*
-diff --git a/ssh2_fopen_wrappers.c b/ssh2_fopen_wrappers.c
-index 2f96ca4..f2f3475 100644
---- a/ssh2_fopen_wrappers.c
-+++ b/ssh2_fopen_wrappers.c
-@@ -215,7 +215,7 @@ php_url *php_ssh2_fopen_wraper_parse_path(const char *path, char *type, php_stre
- 	php_url *resource;
- 	zval *methods = NULL, *callbacks = NULL, zsession, *tmpzval;
- 	zend_long resource_id;
--	char *h, *s, *username = NULL, *password = NULL, *pubkey_file = NULL, *privkey_file = NULL;
-+	char *h, *username = NULL, *password = NULL, *pubkey_file = NULL, *privkey_file = NULL;
- 	int username_len = 0, password_len = 0;
- 
- 	h = strstr(path, "Resource id #");
-@@ -233,13 +233,13 @@ php_url *php_ssh2_fopen_wraper_parse_path(const char *path, char *type, php_stre
- 		return NULL;
- 	}
- 
--	if (strncmp(resource->scheme, "ssh2.", sizeof("ssh2.") - 1)) {
-+	if (strncmp(SSH2_URL_STR(resource->scheme), "ssh2.", sizeof("ssh2.") - 1)) {
- 		/* Not an ssh wrapper */
- 		php_url_free(resource);
- 		return NULL;
- 	}
- 
--	if (strcmp(resource->scheme + sizeof("ssh2.") - 1, type)) {
-+	if (strcmp(SSH2_URL_STR(resource->scheme) + sizeof("ssh2.") - 1, type)) {
- 		/* Wrong ssh2. wrapper type */
- 		php_url_free(resource);
- 		return NULL;
-@@ -253,13 +253,27 @@ php_url *php_ssh2_fopen_wraper_parse_path(const char *path, char *type, php_stre
- 		Find resource->path in the path string, then copy the entire string from the original path.
- 		This includes ?query#fragment in the path string
- 	*/
-+// TODO copy seems uneeded
-+#if PHP_VERSION_ID < 70300
-+	{
-+	char * s;
-+
- 	s = resource->path;
- 	resource->path = estrdup(strstr(path, resource->path));
- 	efree(s);
-+	}
-+#else
-+	{
-+	zend_string *tmp;
-+
-+	tmp = resource->path;
-+	resource->path = zend_string_init(ZSTR_VAL(resource->path), ZSTR_LEN(resource->path), 0);
-+	zend_string_release(tmp);
-+	}
-+#endif
- 
- 	/* Look for a resource ID to reuse a session */
--	s = resource->host;
--	if (is_numeric_string(s, strlen(s), &resource_id, NULL, 0) == IS_LONG) {
-+	if (is_numeric_string(SSH2_URL_STR(resource->host), SSH2_URL_LEN(resource->host), &resource_id, NULL, 0) == IS_LONG) {
- 		php_ssh2_sftp_data *sftp_data;
- 		zval *zresource;
- 
-@@ -309,7 +323,7 @@ php_url *php_ssh2_fopen_wraper_parse_path(const char *path, char *type, php_stre
- 	}
- 
- 	/* Fallback on finding it in the context */
--	if (resource->host[0] == 0 && context && psftp &&
-+	if (SSH2_URL_STR(resource->host)[0] == 0 && context && psftp &&
- 		(tmpzval = php_stream_context_get_option(context, "ssh2", "sftp")) != NULL &&
- 		Z_TYPE_P(tmpzval) == IS_RESOURCE) {
- 		php_ssh2_sftp_data *sftp_data;
-@@ -323,7 +337,7 @@ php_url *php_ssh2_fopen_wraper_parse_path(const char *path, char *type, php_stre
- 			return resource;
- 		}
- 	}
--	if (resource->host[0] == 0 && context &&
-+	if (SSH2_URL_STR(resource->host)[0] == 0 && context &&
- 		(tmpzval = php_stream_context_get_option(context, "ssh2", "session")) != NULL &&
- 		Z_TYPE_P(tmpzval) == IS_RESOURCE) {
- 		session = (LIBSSH2_SESSION *)zend_fetch_resource(Z_RES_P(tmpzval), PHP_SSH2_SESSION_RES_NAME, le_ssh2_session);
-@@ -399,19 +413,19 @@ php_url *php_ssh2_fopen_wraper_parse_path(const char *path, char *type, php_stre
- 	}
- 
- 	if (resource->user) {
--		int len = strlen(resource->user);
-+		int len = SSH2_URL_LEN(resource->user);
- 
- 		if (len) {
--			username = resource->user;
-+			username = SSH2_URL_STR(resource->user);
- 			username_len = len;
- 		}
- 	}
- 
- 	if (resource->pass) {
--		int len = strlen(resource->pass);
-+		int len = SSH2_URL_LEN(resource->pass);
- 
- 		if (len) {
--			password = resource->pass;
-+			password = SSH2_URL_STR(resource->pass);
- 			password_len = len;
- 		}
- 	}
-@@ -422,7 +436,7 @@ php_url *php_ssh2_fopen_wraper_parse_path(const char *path, char *type, php_stre
- 		return NULL;
- 	}
- 
--	session = php_ssh2_session_connect(resource->host, resource->port, methods, callbacks);
-+	session = php_ssh2_session_connect(SSH2_URL_STR(resource->host), resource->port, methods, callbacks);
- 	if (!session) {
- 		/* Unable to connect! */
- 		php_url_free(resource);
-@@ -482,6 +496,7 @@ php_url *php_ssh2_fopen_wraper_parse_path(const char *path, char *type, php_stre
- 		*psftp = sftp;
- 	}
- 
-+	//TODO may be undefined
- 	*presource_id = Z_LVAL(zsession);
- 	*psession = session;
- 
-@@ -527,7 +542,7 @@ static php_stream *php_ssh2_shell_open(LIBSSH2_SESSION *session, int resource_id
- 					zval_copy_ctor(&copyval);
- 					convert_to_string(&copyval);
- 					if (libssh2_channel_setenv_ex(channel, key->val, key->len, Z_STRVAL(copyval), Z_STRLEN(copyval))) {
--						php_error_docref(NULL, E_WARNING, "Failed setting %s=%s on remote end", key, Z_STRVAL(copyval));
-+						php_error_docref(NULL, E_WARNING, "Failed setting %s=%s on remote end", ZSTR_VAL(key), Z_STRVAL(copyval));
- 					}
- 					zval_dtor(&copyval);
- 				}
-@@ -631,7 +646,7 @@ static php_stream *php_ssh2_fopen_wrapper_shell(php_stream_wrapper *wrapper, con
- 		zval_ptr_dtor(&copyval);
- 	}
- 
--	s = resource->path ? resource->path : NULL;
-+	s = resource->path ? SSH2_URL_STR(resource->path) : NULL;
- 
- 	if (s && s[0] == '/') {
- 		/* Terminal type encoded into URL overrides context terminal type */
-@@ -766,7 +781,7 @@ static php_stream *php_ssh2_exec_command(LIBSSH2_SESSION *session, int resource_
- 					zval_copy_ctor(&copyval);
- 					convert_to_string(&copyval);
- 					if (libssh2_channel_setenv_ex(channel, key->val, key->len, Z_STRVAL(copyval), Z_STRLEN(copyval))) {
--						php_error_docref(NULL, E_WARNING, "Failed setting %s=%s on remote end", key, Z_STRVAL(copyval));
-+						php_error_docref(NULL, E_WARNING, "Failed setting %s=%s on remote end", ZSTR_VAL(key), Z_STRVAL(copyval));
- 					}
- 					zval_dtor(&copyval);
- 				}
-@@ -878,7 +893,7 @@ static php_stream *php_ssh2_fopen_wrapper_exec(php_stream_wrapper *wrapper, cons
- 		zval_ptr_dtor(copyval);
- 	}
- 
--	stream = php_ssh2_exec_command(session, resource_id, resource->path + 1, terminal, terminal_len, environment, width, height, type);
-+	stream = php_ssh2_exec_command(session, resource_id, SSH2_URL_STR(resource->path) + 1, terminal, terminal_len, environment, width, height, type);
- 	if (!stream) {
- 		// TODO Sean-Der
- 		//zend_list_delete(resource_id);
-@@ -1021,7 +1036,7 @@ static php_stream *php_ssh2_fopen_wrapper_scp(php_stream_wrapper *wrapper, const
- 		return NULL;
- 	}
- 
--	stream = php_ssh2_scp_xfer(session, resource_id, resource->path);
-+	stream = php_ssh2_scp_xfer(session, resource_id, SSH2_URL_STR(resource->path));
- 	if (!stream) {
- 		//TODO Sean-Der
- 		//zend_list_delete(resource_id);
-@@ -1147,7 +1162,7 @@ PHP_FUNCTION(ssh2_scp_send)
- 		char *error_msg = NULL;
- 
- 		last_error = libssh2_session_last_error(session, &error_msg, NULL, 0);
--		php_error_docref(NULL, E_WARNING, "Failure creating remote file: %s", error_msg);
-+		php_error_docref(NULL, E_WARNING, "Failure creating remote file: %s (%d)", error_msg, last_error);
- 		php_stream_close(local_file);
- 		RETURN_FALSE;
- 	}
-@@ -1262,10 +1277,10 @@ static php_stream *php_ssh2_fopen_wrapper_tunnel(php_stream_wrapper *wrapper, co
- 		return NULL;
- 	}
- 
--	if (resource->path && resource->path[0] == '/') {
-+	if (resource->path && SSH2_URL_STR(resource->path)[0] == '/') {
- 		char *colon;
- 
--		host = resource->path + 1;
-+		host = SSH2_URL_STR(resource->path) + 1;
- 		if (*host == '[') {
- 			/* IPv6 Encapsulated Format */
- 			host++;
-diff --git a/ssh2_sftp.c b/ssh2_sftp.c
-index 13f89f0..6332be8 100644
---- a/ssh2_sftp.c
-+++ b/ssh2_sftp.c
-@@ -238,7 +238,7 @@ static php_stream *php_ssh2_sftp_stream_opener(php_stream_wrapper *wrapper, cons
- 
- 	flags = php_ssh2_parse_fopen_modes((char *)mode);
- 
--	handle = libssh2_sftp_open(sftp, resource->path, flags, perms);
-+	handle = libssh2_sftp_open(sftp, SSH2_URL_STR(resource->path), flags, perms);
- 	if (!handle) {
- 		php_error_docref(NULL, E_WARNING, "Unable to open %s on remote host", filename);
- 		php_url_free(resource);
-@@ -341,7 +341,7 @@ static php_stream *php_ssh2_sftp_dirstream_opener(php_stream_wrapper *wrapper, c
- 		return NULL;
- 	}
- 
--	handle = libssh2_sftp_opendir(sftp, resource->path);
-+	handle = libssh2_sftp_opendir(sftp, SSH2_URL_STR(resource->path));
- 	if (!handle) {
- 		php_error_docref(NULL, E_WARNING, "Unable to open %s on remote host", filename);
- 		php_url_free(resource);
-@@ -386,7 +386,7 @@ static int php_ssh2_sftp_urlstat(php_stream_wrapper *wrapper, const char *url, i
- 		return -1;
- 	}
- 
--	if (libssh2_sftp_stat_ex(sftp, resource->path, strlen(resource->path),
-+	if (libssh2_sftp_stat_ex(sftp, SSH2_URL_STR(resource->path), SSH2_URL_LEN(resource->path),
- 		(flags & PHP_STREAM_URL_STAT_LINK) ? LIBSSH2_SFTP_LSTAT : LIBSSH2_SFTP_STAT, &attrs)) {
- 		php_url_free(resource);
- 		//zend_list_delete(sftp_rsrcid);
-@@ -420,7 +420,7 @@ static int php_ssh2_sftp_unlink(php_stream_wrapper *wrapper, const char *url, in
- 		return 0;
- 	}
- 
--	result = libssh2_sftp_unlink(sftp, resource->path);
-+	result = libssh2_sftp_unlink(sftp, SSH2_URL_STR(resource->path));
- 	php_url_free(resource);
- 
- 	//zend_list_delete(sftp_rsrcid);
-@@ -462,7 +462,7 @@ static int php_ssh2_sftp_rename(php_stream_wrapper *wrapper, const char *url_fro
- 		return 0;
- 	}
- 
--	result = libssh2_sftp_rename(sftp, resource->path, resource_to->path);
-+	result = libssh2_sftp_rename(sftp, SSH2_URL_STR(resource->path), SSH2_URL_STR(resource_to->path));
- 	php_url_free(resource);
- 	php_url_free(resource_to);
- 
-@@ -493,13 +493,13 @@ static int php_ssh2_sftp_mkdir(php_stream_wrapper *wrapper, const char *url, int
- 
- 	if (options & PHP_STREAM_MKDIR_RECURSIVE) {
- 		/* Just attempt to make every directory, some will fail, but we only care about the last success/failure */
--		char *p = resource->path;
-+		char *p = SSH2_URL_STR(resource->path);
- 		while ((p = strchr(p + 1, '/'))) {
--			libssh2_sftp_mkdir_ex(sftp, resource->path, p - resource->path, mode);
-+			libssh2_sftp_mkdir_ex(sftp, SSH2_URL_STR(resource->path), p - SSH2_URL_STR(resource->path), mode);
- 		}
- 	}
- 
--	result = libssh2_sftp_mkdir(sftp, resource->path, mode);
-+	result = libssh2_sftp_mkdir(sftp, SSH2_URL_STR(resource->path), mode);
- 	php_url_free(resource);
- 
- 	//zend_list_delete(sftp_rsrcid);
-@@ -527,7 +527,7 @@ static int php_ssh2_sftp_rmdir(php_stream_wrapper *wrapper, const char *url, int
- 		return 0;
- 	}
- 
--	result = libssh2_sftp_rmdir(sftp, resource->path);
-+	result = libssh2_sftp_rmdir(sftp, SSH2_URL_STR(resource->path));
- 	php_url_free(resource);
- 
- 	//zend_list_delete(sftp_rsrcid);
-@@ -836,7 +836,7 @@ PHP_FUNCTION(ssh2_sftp_readlink)
- 	}
- 
- 	if ((targ_len = libssh2_sftp_symlink_ex(data->sftp, link->val, link->len, targ, 8192, LIBSSH2_SFTP_READLINK)) < 0) {
--		php_error_docref(NULL, E_WARNING, "Unable to read link '%s'", link);
-+		php_error_docref(NULL, E_WARNING, "Unable to read link '%s'", ZSTR_VAL(link));
- 		RETURN_FALSE;
- 	}
- 
diff --git a/package/php-ssh2/0002-dstogov-Fixed-PHP7-port-Restored-commented-reference-counting.patch b/package/php-ssh2/0002-dstogov-Fixed-PHP7-port-Restored-commented-reference-counting.patch
deleted file mode 100644
index d6d62947f7..0000000000
--- a/package/php-ssh2/0002-dstogov-Fixed-PHP7-port-Restored-commented-reference-counting.patch
+++ /dev/null
@@ -1,746 +0,0 @@
-From 073067ba96ac99ed5696d27f13ca6c8124986e74 Mon Sep 17 00:00:00 2001
-From: Jan-E <github@ehrhardt.nl>
-Date: Thu, 28 Jun 2018 08:43:48 +0200
-Subject: [PATCH] @dstogov Fixed PHP7 port. Restored commented reference
- counting.
-
-Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-[Retrieved from:
-https://github.com/php/pecl-networking-ssh2/commit/073067ba96ac99ed5696d27f13ca6c8124986e74]
----
- php_ssh2.h            |  14 ++---
- ssh2.c                |  26 ++++-----
- ssh2_fopen_wrappers.c | 129 ++++++++++++++++++------------------------
- ssh2_sftp.c           |  59 +++++++++----------
- 4 files changed, 102 insertions(+), 126 deletions(-)
-
-diff --git a/php_ssh2.h b/php_ssh2.h
-index d010ff9..2bbaa26 100644
---- a/php_ssh2.h
-+++ b/php_ssh2.h
-@@ -73,14 +73,14 @@ typedef struct _php_ssh2_sftp_data {
- 	LIBSSH2_SESSION *session;
- 	LIBSSH2_SFTP *sftp;
- 
--	int session_rsrcid;
-+	zend_resource *session_rsrc;
- } php_ssh2_sftp_data;
- 
- typedef struct _php_ssh2_listener_data {
- 	LIBSSH2_SESSION *session;
- 	LIBSSH2_LISTENER *listener;
- 
--	int session_rsrcid;
-+	zend_resource *session_rsrc;
- } php_ssh2_listener_data;
- 
- #include "libssh2_publickey.h"
-@@ -89,7 +89,7 @@ typedef struct _php_ssh2_pkey_subsys_data {
- 	LIBSSH2_SESSION *session;
- 	LIBSSH2_PUBLICKEY *pkey;
- 
--	int session_rsrcid;
-+	zend_resource *session_rsrc;
- } php_ssh2_pkey_subsys_data;
- 
- #define SSH2_FETCH_NONAUTHENTICATED_SESSION(session, zsession) \
-@@ -118,8 +118,8 @@ typedef struct _php_ssh2_channel_data {
- 	char is_blocking;
- 	long timeout;
- 
--	/* Resource ID */
--	int session_rsrcid;
-+	/* Resource */
-+	zend_resource *session_rsrc;
- 
- 	/* Allow one stream to be closed while the other is kept open */
- 	unsigned char *refcount;
-@@ -151,8 +151,8 @@ PHP_FUNCTION(ssh2_sftp_realpath);
- LIBSSH2_SESSION *php_ssh2_session_connect(char *host, int port, zval *methods, zval *callbacks);
- void php_ssh2_sftp_dtor(zend_resource *rsrc);
- php_url *php_ssh2_fopen_wraper_parse_path(const char *path, char *type, php_stream_context *context,
--											LIBSSH2_SESSION **psession, int *presource_id,
--											LIBSSH2_SFTP **psftp, int *psftp_rsrcid);
-+											LIBSSH2_SESSION **psession, zend_resource **presource,
-+											LIBSSH2_SFTP **psftp, zend_resource **psftp_rsrc);
- 
- extern php_stream_ops php_ssh2_channel_stream_ops;
- 
-diff --git a/ssh2.c b/ssh2.c
-index e73867e..849766b 100644
---- a/ssh2.c
-+++ b/ssh2.c
-@@ -772,9 +772,8 @@ PHP_FUNCTION(ssh2_forward_listen)
- 
- 	data = emalloc(sizeof(php_ssh2_listener_data));
- 	data->session = session;
--	data->session_rsrcid = Z_LVAL_P(zsession);
--	//TODO Sean-Der
--	//zend_list_addref(data->session_rsrcid);
-+	data->session_rsrc = Z_RES_P(zsession);
-+	Z_ADDREF_P(zsession);
- 	data->listener = listener;
- 
- 	RETURN_RES(zend_register_resource(data, le_ssh2_listener));
-@@ -810,7 +809,7 @@ PHP_FUNCTION(ssh2_forward_accept)
- 	channel_data->channel = channel;
- 	channel_data->streamid = 0;
- 	channel_data->is_blocking = 0;
--	channel_data->session_rsrcid = data->session_rsrcid;
-+	channel_data->session_rsrc = data->session_rsrc;
- 	channel_data->refcount = NULL;
- 
- 	stream = php_stream_alloc(&php_ssh2_channel_stream_ops, channel_data, 0, "r+");
-@@ -820,8 +819,12 @@ PHP_FUNCTION(ssh2_forward_accept)
- 		libssh2_channel_free(channel);
- 		RETURN_FALSE;
- 	}
--	//TODO Sean-Der
--	//zend_list_addref(channel_data->session_rsrcid);
-+
-+#if PHP_VERSION_ID < 70300
-+	GC_REFCOUNT(channel_data->session_rsrc)++;
-+#else
-+	GC_ADDREF(channel_data->session_rsrc);
-+#endif
- 
- 	php_stream_to_zval(stream, return_value);
- }
-@@ -975,9 +978,8 @@ PHP_FUNCTION(ssh2_publickey_init)
- 
- 	data = emalloc(sizeof(php_ssh2_pkey_subsys_data));
- 	data->session = session;
--	data->session_rsrcid = Z_RES_P(zsession)->handle;
--	//TODO Sean-Der
--	//zend_list_addref(data->session_rsrcid);
-+	data->session_rsrc = Z_RES_P(zsession);
-+	Z_ADDREF_P(zsession);
- 	data->pkey = pkey;
- 
- 	RETURN_RES(zend_register_resource(data, le_ssh2_pkey_subsys));
-@@ -1280,8 +1282,7 @@ static void php_ssh2_listener_dtor(zend_resource *rsrc)
- 	LIBSSH2_LISTENER *listener = data->listener;
- 
- 	libssh2_channel_forward_cancel(listener);
--	// TODO Sean-Der
--	//zend_list_delete(data->session_rsrcid);
-+	zend_list_delete(data->session_rsrc);
- 	efree(data);
- }
- 
-@@ -1291,8 +1292,7 @@ static void php_ssh2_pkey_subsys_dtor(zend_resource *rsrc)
- 	LIBSSH2_PUBLICKEY *pkey = data->pkey;
- 
- 	libssh2_publickey_shutdown(pkey);
--	// TODO Sean-Der
--	//zend_list_delete(data->session_rsrcid);
-+	zend_list_delete(data->session_rsrc);
- 	efree(data);
- }
- 
-diff --git a/ssh2_fopen_wrappers.c b/ssh2_fopen_wrappers.c
-index f2f3475..c4eb9dc 100644
---- a/ssh2_fopen_wrappers.c
-+++ b/ssh2_fopen_wrappers.c
-@@ -47,11 +47,9 @@ static size_t php_ssh2_channel_stream_write(php_stream *stream, const char *buf,
- 	php_ssh2_channel_data *abstract = (php_ssh2_channel_data*)stream->abstract;
- 	size_t writestate;
- 	LIBSSH2_SESSION *session;
--	zval *zresource;
- 
- 	libssh2_channel_set_blocking(abstract->channel, abstract->is_blocking);
--	zresource = php_ssh2_zval_from_resource_handle(abstract->session_rsrcid);
--	session = (LIBSSH2_SESSION *)zend_fetch_resource(Z_RES_P(zresource), PHP_SSH2_SESSION_RES_NAME, le_ssh2_session);
-+	session = (LIBSSH2_SESSION *)zend_fetch_resource(abstract->session_rsrc, PHP_SSH2_SESSION_RES_NAME, le_ssh2_session);
- 
- 
- 
-@@ -90,12 +88,10 @@ static size_t php_ssh2_channel_stream_read(php_stream *stream, char *buf, size_t
- 	php_ssh2_channel_data *abstract = (php_ssh2_channel_data*)stream->abstract;
- 	ssize_t readstate;
- 	LIBSSH2_SESSION *session;
--	zval *zresource;
- 
- 	stream->eof = libssh2_channel_eof(abstract->channel);
- 	libssh2_channel_set_blocking(abstract->channel, abstract->is_blocking);
--	zresource = php_ssh2_zval_from_resource_handle(abstract->session_rsrcid);
--	session = (LIBSSH2_SESSION *)zend_fetch_resource(Z_RES_P(zresource), PHP_SSH2_SESSION_RES_NAME, le_ssh2_session);
-+	session = (LIBSSH2_SESSION *)zend_fetch_resource(abstract->session_rsrc, PHP_SSH2_SESSION_RES_NAME, le_ssh2_session);
- 
- #ifdef PHP_SSH2_SESSION_TIMEOUT
- 	if (abstract->is_blocking) {
-@@ -137,8 +133,7 @@ static int php_ssh2_channel_stream_close(php_stream *stream, int close_handle)
- 		}
- 		libssh2_channel_eof(abstract->channel);
- 		libssh2_channel_free(abstract->channel);
--		//TODO Sean-Der
--		//zend_list_delete(abstract->session_rsrcid);
-+		zend_list_delete(abstract->session_rsrc);
- 	}
- 	efree(abstract);
- 
-@@ -207,8 +202,8 @@ php_stream_ops php_ssh2_channel_stream_ops = {
-  * Parse an ssh2.*:// path
-  */
- php_url *php_ssh2_fopen_wraper_parse_path(const char *path, char *type, php_stream_context *context,
--											LIBSSH2_SESSION **psession, int *presource_id,
--											LIBSSH2_SFTP **psftp, int *psftp_rsrcid)
-+											LIBSSH2_SESSION **psession, zend_resource **presource,
-+											LIBSSH2_SFTP **psftp, zend_resource **psftp_rsrc)
- {
- 	php_ssh2_sftp_data *sftp_data = NULL;
- 	LIBSSH2_SESSION *session;
-@@ -283,11 +278,10 @@ php_url *php_ssh2_fopen_wraper_parse_path(const char *path, char *type, php_stre
- 			sftp_data = (php_ssh2_sftp_data *)zend_fetch_resource(Z_RES_P(zresource), PHP_SSH2_SFTP_RES_NAME, le_ssh2_sftp);
- 			if (sftp_data) {
- 				/* Want the sftp layer */
--				//TODO Sean-Der
--				//zend_list_addref(resource_id);
--				*psftp_rsrcid = resource_id;
-+				Z_ADDREF_P(zresource);
-+				*psftp_rsrc = Z_RES_P(zresource);
- 				*psftp = sftp_data->sftp;
--				*presource_id = sftp_data->session_rsrcid;
-+				*presource = sftp_data->session_rsrc;
- 				*psession = sftp_data->session;
- 				return resource;
- 			}
-@@ -305,18 +299,16 @@ php_url *php_ssh2_fopen_wraper_parse_path(const char *path, char *type, php_stre
- 				sftp_data = emalloc(sizeof(php_ssh2_sftp_data));
- 				sftp_data->sftp = sftp;
- 				sftp_data->session = session;
--				sftp_data->session_rsrcid = resource_id;
--				//TODO Sean-Der
--				//zend_list_addref(resource_id);
--				*psftp_rsrcid = zend_register_resource(sftp_data, le_ssh2_sftp)->handle;
-+				sftp_data->session_rsrc = Z_RES_P(zresource);
-+				Z_ADDREF_P(zresource);
-+				*psftp_rsrc = zend_register_resource(sftp_data, le_ssh2_sftp);
- 				*psftp = sftp;
--				*presource_id = resource_id;
-+				*presource = Z_RES_P(zresource);
- 				*psession = session;
- 				return resource;
- 			}
--			//TODO Sean-Der
--			//zend_list_addref(resource_id);
--			*presource_id = resource_id;
-+			Z_ADDREF_P(zresource);
-+			*presource = Z_RES_P(zresource);
- 			*psession = session;
- 			return resource;
- 		}
-@@ -330,9 +322,9 @@ php_url *php_ssh2_fopen_wraper_parse_path(const char *path, char *type, php_stre
- 		sftp_data = (php_ssh2_sftp_data *)zend_fetch_resource(Z_RES_P(tmpzval), PHP_SSH2_SFTP_RES_NAME, le_ssh2_sftp);
- 		if (sftp_data) {
- 			Z_ADDREF_P(tmpzval);
--			*psftp_rsrcid = Z_LVAL_P(tmpzval);
-+			*psftp_rsrc = Z_RES_P(tmpzval);
- 			*psftp = sftp_data->sftp;
--			*presource_id = sftp_data->session_rsrcid;
-+			*presource = sftp_data->session_rsrc;
- 			*psession = sftp_data->session;
- 			return resource;
- 		}
-@@ -354,17 +346,17 @@ php_url *php_ssh2_fopen_wraper_parse_path(const char *path, char *type, php_stre
- 				sftp_data = emalloc(sizeof(php_ssh2_sftp_data));
- 				sftp_data->sftp = sftp;
- 				sftp_data->session = session;
--				sftp_data->session_rsrcid = Z_LVAL_P(tmpzval);
-+				sftp_data->session_rsrc = Z_RES_P(tmpzval);
- 				Z_ADDREF_P(tmpzval);
--				*psftp_rsrcid = zend_register_resource(sftp_data, le_ssh2_sftp)->handle;
-+				*psftp_rsrc = zend_register_resource(sftp_data, le_ssh2_sftp);
- 				*psftp = sftp;
--				*presource_id = Z_RES_P(tmpzval)->handle;
-+				*presource = Z_RES_P(tmpzval);
- 				*psession = session;
- 				return resource;
- 			}
- 			Z_ADDREF_P(tmpzval);
- 			*psession = session;
--			*presource_id = Z_LVAL_P(tmpzval);
-+			*presource = Z_RES_P(tmpzval);
- 			return resource;
- 		}
- 	}
-@@ -465,8 +457,7 @@ php_url *php_ssh2_fopen_wraper_parse_path(const char *path, char *type, php_stre
- 
- 	/* Auth failure */
- 	php_url_free(resource);
--	//TODO Sean-Der
--	//zend_list_delete(Z_LVAL(zsession));
-+	zend_list_delete(Z_RES(zsession));
- 	return NULL;
- 
- session_authed:
-@@ -480,24 +471,22 @@ php_url *php_ssh2_fopen_wraper_parse_path(const char *path, char *type, php_stre
- 		sftp = libssh2_sftp_init(session);
- 		if (!sftp) {
- 			php_url_free(resource);
--			//TODO Sean-Der
--			//zend_list_delete(Z_LVAL(zsession));
-+			zend_list_delete(Z_RES(zsession));
- 			return NULL;
- 		}
- 
- 		sftp_data = emalloc(sizeof(php_ssh2_sftp_data));
- 		sftp_data->session = session;
- 		sftp_data->sftp = sftp;
--		sftp_data->session_rsrcid = Z_LVAL(zsession);
-+		sftp_data->session_rsrc = Z_RES(zsession);
- 
- 		//TODO Sean-Der
- 		//ZEND_REGISTER_RESOURCE(sftp_data, le_ssh2_sftp);
--		*psftp_rsrcid = Z_LVAL(zsftp);
-+		*psftp_rsrc = Z_RES(zsftp);
- 		*psftp = sftp;
- 	}
- 
--	//TODO may be undefined
--	*presource_id = Z_LVAL(zsession);
-+	*presource = Z_RES(zsession);
- 	*psession = session;
- 
- 	return resource;
-@@ -511,7 +500,7 @@ php_url *php_ssh2_fopen_wraper_parse_path(const char *path, char *type, php_stre
- /* {{{ php_ssh2_shell_open
-  * Make a stream from a session
-  */
--static php_stream *php_ssh2_shell_open(LIBSSH2_SESSION *session, int resource_id, char *term, int term_len, zval *environment, long width, long height, long type)
-+static php_stream *php_ssh2_shell_open(LIBSSH2_SESSION *session, zend_resource *resource, char *term, int term_len, zval *environment, long width, long height, long type)
- {
- 	LIBSSH2_CHANNEL *channel;
- 	php_ssh2_channel_data *channel_data;
-@@ -578,7 +567,7 @@ static php_stream *php_ssh2_shell_open(LIBSSH2_SESSION *session, int resource_id
- 	channel_data->streamid = 0;
- 	channel_data->is_blocking = 0;
- 	channel_data->timeout = 0;
--	channel_data->session_rsrcid = resource_id;
-+	channel_data->session_rsrc = resource;
- 	channel_data->refcount = NULL;
- 
- 	stream = php_stream_alloc(&php_ssh2_channel_stream_ops, channel_data, 0, "r+");
-@@ -599,11 +588,12 @@ static php_stream *php_ssh2_fopen_wrapper_shell(php_stream_wrapper *wrapper, con
- 	zend_long width = PHP_SSH2_DEFAULT_TERM_WIDTH;
- 	zend_long height = PHP_SSH2_DEFAULT_TERM_HEIGHT;
- 	zend_long type = PHP_SSH2_DEFAULT_TERM_UNIT;
--	int resource_id = 0, terminal_len = sizeof(PHP_SSH2_DEFAULT_TERMINAL) - 1;
-+	zend_resource *rsrc = NULL;
-+	int terminal_len = sizeof(PHP_SSH2_DEFAULT_TERMINAL) - 1;
- 	php_url *resource;
- 	char *s;
- 
--	resource = php_ssh2_fopen_wraper_parse_path(path, "shell", context, &session, &resource_id, NULL, NULL);
-+	resource = php_ssh2_fopen_wraper_parse_path(path, "shell", context, &session, &rsrc, NULL, NULL);
- 	if (!resource || !session) {
- 		return NULL;
- 	}
-@@ -677,10 +667,9 @@ static php_stream *php_ssh2_fopen_wrapper_shell(php_stream_wrapper *wrapper, con
- 	/* TODO: Accept resolution and environment vars as URL style parameters
- 	 * ssh2.shell://hostorresource/terminal/99x99c?envvar=envval&envvar=envval....
- 	 */
--	stream = php_ssh2_shell_open(session, resource_id, terminal, terminal_len, environment, width, height, type);
-+	stream = php_ssh2_shell_open(session, rsrc, terminal, terminal_len, environment, width, height, type);
- 	if (!stream) {
--		//TODO Sean-Der
--		//zend_list_delete(resource_id);
-+		zend_list_delete(rsrc);
- 	}
- 	php_url_free(resource);
- 
-@@ -730,7 +719,7 @@ PHP_FUNCTION(ssh2_shell)
- 
- 	SSH2_FETCH_AUTHENTICATED_SESSION(session, zsession);
- 
--	stream = php_ssh2_shell_open(session, Z_RES_P(zsession)->handle, term, term_len, environment, width, height, type);
-+	stream = php_ssh2_shell_open(session, Z_RES_P(zsession), term, term_len, environment, width, height, type);
- 	if (!stream) {
- 		RETURN_FALSE;
- 	}
-@@ -749,7 +738,7 @@ PHP_FUNCTION(ssh2_shell)
- /* {{{ php_ssh2_exec_command
-  * Make a stream from a session
-  */
--static php_stream *php_ssh2_exec_command(LIBSSH2_SESSION *session, int resource_id, char *command, char *term, int term_len, zval *environment, long width, long height, long type)
-+static php_stream *php_ssh2_exec_command(LIBSSH2_SESSION *session, zend_resource *rsrc, char *command, char *term, int term_len, zval *environment, long width, long height, long type)
- {
- 	LIBSSH2_CHANNEL *channel;
- 	php_ssh2_channel_data *channel_data;
-@@ -819,7 +808,7 @@ static php_stream *php_ssh2_exec_command(LIBSSH2_SESSION *session, int resource_
- 	channel_data->streamid = 0;
- 	channel_data->is_blocking = 0;
- 	channel_data->timeout = 0;
--	channel_data->session_rsrcid = resource_id;
-+	channel_data->session_rsrc = rsrc;
- 	channel_data->refcount = NULL;
- 
- 	stream = php_stream_alloc(&php_ssh2_channel_stream_ops, channel_data, 0, "r+");
-@@ -836,7 +825,7 @@ static php_stream *php_ssh2_fopen_wrapper_exec(php_stream_wrapper *wrapper, cons
- 	LIBSSH2_SESSION *session = NULL;
- 	php_stream *stream;
- 	zval *tmpzval, *environment = NULL;
--	int resource_id = 0;
-+	zend_resource *rsrc = NULL;
- 	php_url *resource;
- 	char *terminal = NULL;
- 	int terminal_len = 0;
-@@ -844,14 +833,13 @@ static php_stream *php_ssh2_fopen_wrapper_exec(php_stream_wrapper *wrapper, cons
- 	long height = PHP_SSH2_DEFAULT_TERM_HEIGHT;
- 	long type = PHP_SSH2_DEFAULT_TERM_UNIT;
- 
--	resource = php_ssh2_fopen_wraper_parse_path(path, "exec", context, &session, &resource_id, NULL, NULL);
-+	resource = php_ssh2_fopen_wraper_parse_path(path, "exec", context, &session, &rsrc, NULL, NULL);
- 	if (!resource || !session) {
- 		return NULL;
- 	}
- 	if (!resource->path) {
- 		php_url_free(resource);
--		//TODO Sean-Der
--		//zend_list_delete(resource_id);
-+		zend_list_delete(rsrc);
- 		return NULL;
- 	}
- 
-@@ -893,10 +881,9 @@ static php_stream *php_ssh2_fopen_wrapper_exec(php_stream_wrapper *wrapper, cons
- 		zval_ptr_dtor(copyval);
- 	}
- 
--	stream = php_ssh2_exec_command(session, resource_id, SSH2_URL_STR(resource->path) + 1, terminal, terminal_len, environment, width, height, type);
-+	stream = php_ssh2_exec_command(session, rsrc, SSH2_URL_STR(resource->path) + 1, terminal, terminal_len, environment, width, height, type);
- 	if (!stream) {
--		// TODO Sean-Der
--		//zend_list_delete(resource_id);
-+		zend_list_delete(rsrc);
- 	}
- 	php_url_free(resource);
- 
-@@ -963,7 +950,7 @@ PHP_FUNCTION(ssh2_exec)
- 
- 	SSH2_FETCH_AUTHENTICATED_SESSION(session, zsession);
- 
--	stream = php_ssh2_exec_command(session, Z_RES_P(zsession)->handle, command, term, term_len, environment, width, height, type);
-+	stream = php_ssh2_exec_command(session, Z_RES_P(zsession), command, term, term_len, environment, width, height, type);
- 	if (!stream) {
- 		RETURN_FALSE;
- 	}
-@@ -982,7 +969,7 @@ PHP_FUNCTION(ssh2_exec)
- /* {{{ php_ssh2_scp_xfer
-  * Make a stream from a session
-  */
--static php_stream *php_ssh2_scp_xfer(LIBSSH2_SESSION *session, int resource_id, char *filename)
-+static php_stream *php_ssh2_scp_xfer(LIBSSH2_SESSION *session, zend_resource *rsrc, char *filename)
- {
- 	LIBSSH2_CHANNEL *channel;
- 	php_ssh2_channel_data *channel_data;
-@@ -1002,7 +989,7 @@ static php_stream *php_ssh2_scp_xfer(LIBSSH2_SESSION *session, int resource_id,
- 	channel_data->streamid = 0;
- 	channel_data->is_blocking = 0;
- 	channel_data->timeout = 0;
--	channel_data->session_rsrcid = resource_id;
-+	channel_data->session_rsrc = rsrc;
- 	channel_data->refcount = NULL;
- 
- 	stream = php_stream_alloc(&php_ssh2_channel_stream_ops, channel_data, 0, "r");
-@@ -1018,28 +1005,26 @@ static php_stream *php_ssh2_fopen_wrapper_scp(php_stream_wrapper *wrapper, const
- {
- 	LIBSSH2_SESSION *session = NULL;
- 	php_stream *stream;
--	int resource_id = 0;
-+	zend_resource *rsrc = NULL;
- 	php_url *resource;
- 
- 	if (strchr(mode, '+') || strchr(mode, 'a') || strchr(mode, 'w')) {
- 		return NULL;
- 	}
- 
--	resource = php_ssh2_fopen_wraper_parse_path(path, "scp", context, &session, &resource_id, NULL, NULL);
-+	resource = php_ssh2_fopen_wraper_parse_path(path, "scp", context, &session, &rsrc, NULL, NULL);
- 	if (!resource || !session) {
- 		return NULL;
- 	}
- 	if (!resource->path) {
- 		php_url_free(resource);
--		//TODO Sean-Der
--		//zend_list_delete(resource_id);
-+		zend_list_delete(rsrc);
- 		return NULL;
- 	}
- 
--	stream = php_ssh2_scp_xfer(session, resource_id, SSH2_URL_STR(resource->path));
-+	stream = php_ssh2_scp_xfer(session, rsrc, SSH2_URL_STR(resource->path));
- 	if (!stream) {
--		//TODO Sean-Der
--		//zend_list_delete(resource_id);
-+		zend_list_delete(rsrc);
- 	}
- 	php_url_free(resource);
- 
-@@ -1231,7 +1216,7 @@ PHP_FUNCTION(ssh2_scp_send)
- /* {{{ php_ssh2_direct_tcpip
-  * Make a stream from a session
-  */
--static php_stream *php_ssh2_direct_tcpip(LIBSSH2_SESSION *session, int resource_id, char *host, int port)
-+static php_stream *php_ssh2_direct_tcpip(LIBSSH2_SESSION *session, zend_resource *rsrc, char *host, int port)
- {
- 	LIBSSH2_CHANNEL *channel;
- 	php_ssh2_channel_data *channel_data;
-@@ -1251,7 +1236,7 @@ static php_stream *php_ssh2_direct_tcpip(LIBSSH2_SESSION *session, int resource_
- 	channel_data->streamid = 0;
- 	channel_data->is_blocking = 0;
- 	channel_data->timeout = 0;
--	channel_data->session_rsrcid = resource_id;
-+	channel_data->session_rsrc = rsrc;
- 	channel_data->refcount = NULL;
- 
- 	stream = php_stream_alloc(&php_ssh2_channel_stream_ops, channel_data, 0, "r+");
-@@ -1270,9 +1255,9 @@ static php_stream *php_ssh2_fopen_wrapper_tunnel(php_stream_wrapper *wrapper, co
- 	php_url *resource;
- 	char *host = NULL;
- 	int port = 0;
--	int resource_id = 0;
-+	zend_resource *rsrc;
- 
--	resource = php_ssh2_fopen_wraper_parse_path(path, "tunnel", context, &session, &resource_id, NULL, NULL);
-+	resource = php_ssh2_fopen_wraper_parse_path(path, "tunnel", context, &session, &rsrc, NULL, NULL);
- 	if (!resource || !session) {
- 		return NULL;
- 	}
-@@ -1303,15 +1288,13 @@ static php_stream *php_ssh2_fopen_wrapper_tunnel(php_stream_wrapper *wrapper, co
- 	if ((port <= 0) || (port > 65535) || !host || (strlen(host) == 0)) {
- 		/* Invalid connection criteria */
- 		php_url_free(resource);
--		//TODO Sean-Der
--		//zend_list_delete(resource_id);
-+		zend_list_delete(rsrc);
- 		return NULL;
- 	}
- 
--	stream = php_ssh2_direct_tcpip(session, resource_id, host, port);
-+	stream = php_ssh2_direct_tcpip(session, rsrc, host, port);
- 	if (!stream) {
--		// TODO Sean-Der
--		//zend_list_delete(resource_id);
-+		zend_list_delete(rsrc);
- 	}
- 	php_url_free(resource);
- 
-@@ -1352,7 +1335,7 @@ PHP_FUNCTION(ssh2_tunnel)
- 
- 	SSH2_FETCH_AUTHENTICATED_SESSION(session, zsession);
- 
--	stream = php_ssh2_direct_tcpip(session, Z_RES_P(zsession)->handle, host, port);
-+	stream = php_ssh2_direct_tcpip(session, Z_RES_P(zsession), host, port);
- 	if (!stream) {
- 		RETURN_FALSE;
- 	}
-diff --git a/ssh2_sftp.c b/ssh2_sftp.c
-index 6332be8..256fc70 100644
---- a/ssh2_sftp.c
-+++ b/ssh2_sftp.c
-@@ -40,8 +40,7 @@ void php_ssh2_sftp_dtor(zend_resource *rsrc)
- 
- 	libssh2_sftp_shutdown(data->sftp);
- 
--	// TODO Sean-Der
--	//zend_list_delete(data->session_rsrcid);
-+	zend_list_delete(data->session_rsrc);
- 
- 	efree(data);
- }
-@@ -50,7 +49,7 @@ void php_ssh2_sftp_dtor(zend_resource *rsrc)
-    * SFTP File Ops *
-    ***************** */
- 
--inline unsigned long php_ssh2_parse_fopen_modes(char *openmode) {
-+unsigned long php_ssh2_parse_fopen_modes(char *openmode) {
- 	unsigned long flags = 0;
- 
- 	if (strchr(openmode, 'a')) {
-@@ -101,7 +100,7 @@ inline int php_ssh2_sftp_attr2ssb(php_stream_statbuf *ssb, LIBSSH2_SFTP_ATTRIBUT
- typedef struct _php_ssh2_sftp_handle_data {
- 	LIBSSH2_SFTP_HANDLE *handle;
- 
--	long sftp_rsrcid;
-+	zend_resource *sftp_rsrc;
- } php_ssh2_sftp_handle_data;
- 
- /* {{{ php_ssh2_sftp_stream_write
-@@ -139,8 +138,7 @@ static int php_ssh2_sftp_stream_close(php_stream *stream, int close_handle)
- 	php_ssh2_sftp_handle_data *data = (php_ssh2_sftp_handle_data*)stream->abstract;
- 
- 	libssh2_sftp_close(data->handle);
--	//TODO Sean-Der
--	//zend_list_delete(data->sftp_rsrcid);
-+	zend_list_delete(data->sftp_rsrc);
- 	efree(data);
- 
- 	return 0;
-@@ -226,12 +224,12 @@ static php_stream *php_ssh2_sftp_stream_opener(php_stream_wrapper *wrapper, cons
- 	LIBSSH2_SFTP *sftp = NULL;
- 	LIBSSH2_SFTP_HANDLE *handle;
- 	php_stream *stream;
--	int resource_id = 0, sftp_rsrcid = 0;
-+	zend_resource *rsrc = NULL, *sftp_rsrc = NULL;
- 	php_url *resource;
- 	unsigned long flags;
- 	long perms = 0644;
- 
--	resource = php_ssh2_fopen_wraper_parse_path(filename, "sftp", context, &session, &resource_id, &sftp, &sftp_rsrcid);
-+	resource = php_ssh2_fopen_wraper_parse_path(filename, "sftp", context, &session, &rsrc, &sftp, &sftp_rsrc);
- 	if (!resource || !session || !sftp) {
- 		return NULL;
- 	}
-@@ -242,20 +240,18 @@ static php_stream *php_ssh2_sftp_stream_opener(php_stream_wrapper *wrapper, cons
- 	if (!handle) {
- 		php_error_docref(NULL, E_WARNING, "Unable to open %s on remote host", filename);
- 		php_url_free(resource);
--		//TODO Sean-Der
--		//zend_list_delete(sftp_rsrcid);
-+		zend_list_delete(sftp_rsrc);
- 		return NULL;
- 	}
- 
- 	data = emalloc(sizeof(php_ssh2_sftp_handle_data));
- 	data->handle = handle;
--	data->sftp_rsrcid = sftp_rsrcid;
-+	data->sftp_rsrc = sftp_rsrc;
- 
- 	stream = php_stream_alloc(&php_ssh2_sftp_stream_ops, data, 0, mode);
- 	if (!stream) {
- 		libssh2_sftp_close(handle);
--		// TODO Sean-Der
--		//zend_list_delete(sftp_rsrcid);
-+		zend_list_delete(sftp_rsrc);
- 		efree(data);
- 	}
- 	php_url_free(resource);
-@@ -303,8 +299,7 @@ static int php_ssh2_sftp_dirstream_close(php_stream *stream, int close_handle)
- 	php_ssh2_sftp_handle_data *data = (php_ssh2_sftp_handle_data*)stream->abstract;
- 
- 	libssh2_sftp_close(data->handle);
--	//TODO Sean_der
--	//zend_list_delete(data->sftp_rsrcid);
-+	zend_list_delete(data->sftp_rsrc);
- 	efree(data);
- 
- 	return 0;
-@@ -333,10 +328,10 @@ static php_stream *php_ssh2_sftp_dirstream_opener(php_stream_wrapper *wrapper, c
- 	LIBSSH2_SFTP *sftp = NULL;
- 	LIBSSH2_SFTP_HANDLE *handle;
- 	php_stream *stream;
--	int resource_id = 0, sftp_rsrcid = 0;
-+	zend_resource *rsrc = NULL, *sftp_rsrc = NULL;
- 	php_url *resource;
- 
--	resource = php_ssh2_fopen_wraper_parse_path(filename, "sftp", context, &session, &resource_id, &sftp, &sftp_rsrcid);
-+	resource = php_ssh2_fopen_wraper_parse_path(filename, "sftp", context, &session, &rsrc, &sftp, &sftp_rsrc);
- 	if (!resource || !session || !sftp) {
- 		return NULL;
- 	}
-@@ -345,20 +340,18 @@ static php_stream *php_ssh2_sftp_dirstream_opener(php_stream_wrapper *wrapper, c
- 	if (!handle) {
- 		php_error_docref(NULL, E_WARNING, "Unable to open %s on remote host", filename);
- 		php_url_free(resource);
--		//TODO Sean-Der
--		//zend_list_delete(sftp_rsrcid);
-+		zend_list_delete(sftp_rsrc);
- 		return NULL;
- 	}
- 
- 	data = emalloc(sizeof(php_ssh2_sftp_handle_data));
- 	data->handle = handle;
--	data->sftp_rsrcid = sftp_rsrcid;
-+	data->sftp_rsrc = sftp_rsrc;
- 
- 	stream = php_stream_alloc(&php_ssh2_sftp_dirstream_ops, data, 0, mode);
- 	if (!stream) {
- 		libssh2_sftp_close(handle);
--		//TODO Sean-Der
--		//zend_list_delete(sftp_rsrcid);
-+		zend_list_delete(sftp_rsrc);
- 		efree(data);
- 	}
- 	php_url_free(resource);
-@@ -378,10 +371,10 @@ static int php_ssh2_sftp_urlstat(php_stream_wrapper *wrapper, const char *url, i
- 	LIBSSH2_SFTP_ATTRIBUTES attrs;
- 	LIBSSH2_SESSION *session = NULL;
- 	LIBSSH2_SFTP *sftp = NULL;
--	int resource_id = 0, sftp_rsrcid = 0;
-+	zend_resource *rsrc = NULL, *sftp_rsrc = NULL;
- 	php_url *resource;
- 
--	resource = php_ssh2_fopen_wraper_parse_path(url, "sftp", context, &session, &resource_id, &sftp, &sftp_rsrcid);
-+	resource = php_ssh2_fopen_wraper_parse_path(url, "sftp", context, &session, &rsrc, &sftp, &sftp_rsrc);
- 	if (!resource || !session || !sftp || !resource->path) {
- 		return -1;
- 	}
-@@ -408,11 +401,11 @@ static int php_ssh2_sftp_unlink(php_stream_wrapper *wrapper, const char *url, in
- {
- 	LIBSSH2_SESSION *session = NULL;
- 	LIBSSH2_SFTP *sftp = NULL;
--	int resource_id = 0, sftp_rsrcid = 0;
-+	zend_resource *rsrc = NULL, *sftp_rsrc = NULL;
- 	php_url *resource;
- 	int result;
- 
--	resource = php_ssh2_fopen_wraper_parse_path(url, "sftp", context, &session, &resource_id, &sftp, &sftp_rsrcid);
-+	resource = php_ssh2_fopen_wraper_parse_path(url, "sftp", context, &session, &rsrc, &sftp, &sftp_rsrc);
- 	if (!resource || !session || !sftp || !resource->path) {
- 		if (resource) {
- 			php_url_free(resource);
-@@ -436,7 +429,7 @@ static int php_ssh2_sftp_rename(php_stream_wrapper *wrapper, const char *url_fro
- {
- 	LIBSSH2_SESSION *session = NULL;
- 	LIBSSH2_SFTP *sftp = NULL;
--	int resource_id = 0, sftp_rsrcid = 0;
-+	zend_resource *rsrc = NULL, *sftp_rsrc = NULL;
- 	php_url *resource, *resource_to;
- 	int result;
- 
-@@ -453,7 +446,7 @@ static int php_ssh2_sftp_rename(php_stream_wrapper *wrapper, const char *url_fro
- 		return 0;
- 	}
- 
--	resource = php_ssh2_fopen_wraper_parse_path(url_from, "sftp", context, &session, &resource_id, &sftp, &sftp_rsrcid);
-+	resource = php_ssh2_fopen_wraper_parse_path(url_from, "sftp", context, &session, &rsrc, &sftp, &sftp_rsrc);
- 	if (!resource || !session || !sftp || !resource->path) {
- 		if (resource) {
- 			php_url_free(resource);
-@@ -479,11 +472,11 @@ static int php_ssh2_sftp_mkdir(php_stream_wrapper *wrapper, const char *url, int
- {
- 	LIBSSH2_SESSION *session = NULL;
- 	LIBSSH2_SFTP *sftp = NULL;
--	int resource_id = 0, sftp_rsrcid = 0;
-+	zend_resource *rsrc = NULL, *sftp_rsrc = NULL;
- 	php_url *resource;
- 	int result;
- 
--	resource = php_ssh2_fopen_wraper_parse_path(url, "sftp", context, &session, &resource_id, &sftp, &sftp_rsrcid);
-+	resource = php_ssh2_fopen_wraper_parse_path(url, "sftp", context, &session, &rsrc, &sftp, &sftp_rsrc);
- 	if (!resource || !session || !sftp || !resource->path) {
- 		if (resource) {
- 			php_url_free(resource);
-@@ -515,11 +508,11 @@ static int php_ssh2_sftp_rmdir(php_stream_wrapper *wrapper, const char *url, int
- {
- 	LIBSSH2_SESSION *session = NULL;
- 	LIBSSH2_SFTP *sftp = NULL;
--	int resource_id = 0, sftp_rsrcid = 0;
-+	zend_resource *rsrc = NULL, *sftp_rsrc = NULL;
- 	php_url *resource;
- 	int result;
- 
--	resource = php_ssh2_fopen_wraper_parse_path(url, "sftp", context, &session, &resource_id, &sftp, &sftp_rsrcid);
-+	resource = php_ssh2_fopen_wraper_parse_path(url, "sftp", context, &session, &rsrc, &sftp, &sftp_rsrc);
- 	if (!resource || !session || !sftp || !resource->path) {
- 		if (resource) {
- 			php_url_free(resource);
-@@ -591,7 +584,7 @@ PHP_FUNCTION(ssh2_sftp)
- 	data = emalloc(sizeof(php_ssh2_sftp_data));
- 	data->session = session;
- 	data->sftp = sftp;
--	data->session_rsrcid = Z_RES_P(zsession)->handle;
-+	data->session_rsrc = Z_RES_P(zsession);
- 	Z_ADDREF_P(zsession);
- 
- 	RETURN_RES(zend_register_resource(data, le_ssh2_sftp));
diff --git a/package/php-ssh2/php-ssh2.hash b/package/php-ssh2/php-ssh2.hash
index 36e04f471f..3fbb0b24c8 100644
--- a/package/php-ssh2/php-ssh2.hash
+++ b/package/php-ssh2/php-ssh2.hash
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256  87618d6a0981afe8c24b36d6b38c21a0aa0237b62e60347d0170bd86b51f79fb  ssh2-1.1.2.tgz
+sha256  9093a1f8d24dc65836027b0e239c50de8d5eaebf8396bc3331fdd38c5d69afd9  ssh2-1.3.1.tgz
 sha256  ac7c56f1e416ce6e60abcf26269395128bc9e5a2e4f3293e5dcc124aac606508  LICENSE
diff --git a/package/php-ssh2/php-ssh2.mk b/package/php-ssh2/php-ssh2.mk
index c9c13010dd..b79ac04179 100644
--- a/package/php-ssh2/php-ssh2.mk
+++ b/package/php-ssh2/php-ssh2.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-PHP_SSH2_VERSION = 1.1.2
+PHP_SSH2_VERSION = 1.3.1
 PHP_SSH2_SOURCE = ssh2-$(PHP_SSH2_VERSION).tgz
 PHP_SSH2_SITE = https://pecl.php.net/get
 PHP_SSH2_CONF_OPTS = --with-php-config=$(STAGING_DIR)/usr/bin/php-config \
-- 
2.31.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 06/11] package/php-xdebug: bump version to 3.0.4
  2021-06-29 16:50 [Buildroot] [PATCH 01/11] package/php-amqp: bump version to 1.10.2 Adam Duskett
                   ` (3 preceding siblings ...)
  2021-06-29 16:50 ` [Buildroot] [PATCH 05/11] package/php-ssh2: bump version to 1.3.1 Adam Duskett
@ 2021-06-29 16:50 ` Adam Duskett
  2021-06-29 16:50 ` [Buildroot] [PATCH 07/11] package/php-yaml: bump version to 2.2.1 Adam Duskett
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Adam Duskett @ 2021-06-29 16:50 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
 package/php-xdebug/php-xdebug.hash | 4 ++--
 package/php-xdebug/php-xdebug.mk   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/php-xdebug/php-xdebug.hash b/package/php-xdebug/php-xdebug.hash
index 8b90352ebf..72bfac67ce 100644
--- a/package/php-xdebug/php-xdebug.hash
+++ b/package/php-xdebug/php-xdebug.hash
@@ -1,3 +1,3 @@
 # Locally computed
-sha256 ef479ee1a3da3f933e0d046ca8cd0c14601f29b2c0c41cc60c9388546a4e0272  LICENSE
-sha256 e330c5ccb77890b06dd7bf093567051450b2438b79fed8e7e6c4834278d46092  php-xdebug-2.9.6.tar.gz
+sha256  7e4f28fc65c8b535de43b6d2ec57429476a6de1d53c4d440a9108ae8d28e01f4  php-xdebug-3.0.4.tar.gz
+sha256  ef479ee1a3da3f933e0d046ca8cd0c14601f29b2c0c41cc60c9388546a4e0272  LICENSE
diff --git a/package/php-xdebug/php-xdebug.mk b/package/php-xdebug/php-xdebug.mk
index ab6ade4cb1..18ebc32592 100644
--- a/package/php-xdebug/php-xdebug.mk
+++ b/package/php-xdebug/php-xdebug.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-PHP_XDEBUG_VERSION = 2.9.6
+PHP_XDEBUG_VERSION = 3.0.4
 PHP_XDEBUG_SITE = $(call github,xdebug,xdebug,$(PHP_XDEBUG_VERSION))
 PHP_XDEBUG_INSTALL_STAGING = YES
 PHP_XDEBUG_LICENSE = Xdebug License (PHP-3.0-like)
-- 
2.31.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 07/11] package/php-yaml: bump version to 2.2.1
  2021-06-29 16:50 [Buildroot] [PATCH 01/11] package/php-amqp: bump version to 1.10.2 Adam Duskett
                   ` (4 preceding siblings ...)
  2021-06-29 16:50 ` [Buildroot] [PATCH 06/11] package/php-xdebug: bump version to 3.0.4 Adam Duskett
@ 2021-06-29 16:50 ` Adam Duskett
  2021-06-29 16:50 ` [Buildroot] [PATCH 08/11] package/php-zmq: add upstream php8 compatibility patches Adam Duskett
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Adam Duskett @ 2021-06-29 16:50 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
 package/php-yaml/php-yaml.hash | 4 ++--
 package/php-yaml/php-yaml.mk   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/php-yaml/php-yaml.hash b/package/php-yaml/php-yaml.hash
index c29c3e66ad..e4f31cdad9 100644
--- a/package/php-yaml/php-yaml.hash
+++ b/package/php-yaml/php-yaml.hash
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256 9786b0386e648f12cc18a038358bd57bee4906e350a2e9ab776d6a5f18fc6680  yaml-2.0.4.tgz
-sha256 68d9700294396c72089bfc7bf38a5b3654a53ae415f3bd37768848c14e86f338  LICENSE
+sha256  e17ad04e752e25fd099bddd2df9d26dfef183c8d00c4179bc9d7a2e1c97d7819  yaml-2.2.1.tgz
+sha256  68d9700294396c72089bfc7bf38a5b3654a53ae415f3bd37768848c14e86f338  LICENSE
diff --git a/package/php-yaml/php-yaml.mk b/package/php-yaml/php-yaml.mk
index e23d897978..ba16c9ac62 100644
--- a/package/php-yaml/php-yaml.mk
+++ b/package/php-yaml/php-yaml.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-PHP_YAML_VERSION = 2.0.4
+PHP_YAML_VERSION = 2.2.1
 PHP_YAML_SOURCE = yaml-$(PHP_YAML_VERSION).tgz
 PHP_YAML_SITE = https://pecl.php.net/get
 PHP_YAML_CONF_OPTS = --with-php-config=$(STAGING_DIR)/usr/bin/php-config \
-- 
2.31.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 08/11] package/php-zmq: add upstream php8 compatibility patches
  2021-06-29 16:50 [Buildroot] [PATCH 01/11] package/php-amqp: bump version to 1.10.2 Adam Duskett
                   ` (5 preceding siblings ...)
  2021-06-29 16:50 ` [Buildroot] [PATCH 07/11] package/php-yaml: bump version to 2.2.1 Adam Duskett
@ 2021-06-29 16:50 ` Adam Duskett
  2021-06-29 16:50 ` [Buildroot] [PATCH 09/11] package/php-geoip: add php8 build support Adam Duskett
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Adam Duskett @ 2021-06-29 16:50 UTC (permalink / raw)
  To: buildroot

These patches are necessary for compiling against php8. These patches also
retain the ability to compile against PHP7.2 and should be removed during the
next version bump.

Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
 ...1-PHP-7.3-compatibility-and-bugfixes.patch | 271 ------------------
 .../0001-updates-for-php7.4-and-php8.0.patch  | 230 +++++++++++++++
 package/php-zmq/0002-fix-for-php-7.3.patch    |  43 +++
 .../php-zmq/0003-fix-for-php-8.0.0beta2.patch |  40 +++
 4 files changed, 313 insertions(+), 271 deletions(-)
 delete mode 100644 package/php-zmq/0001-PHP-7.3-compatibility-and-bugfixes.patch
 create mode 100644 package/php-zmq/0001-updates-for-php7.4-and-php8.0.patch
 create mode 100644 package/php-zmq/0002-fix-for-php-7.3.patch
 create mode 100644 package/php-zmq/0003-fix-for-php-8.0.0beta2.patch

diff --git a/package/php-zmq/0001-PHP-7.3-compatibility-and-bugfixes.patch b/package/php-zmq/0001-PHP-7.3-compatibility-and-bugfixes.patch
deleted file mode 100644
index 83cdb04530..0000000000
--- a/package/php-zmq/0001-PHP-7.3-compatibility-and-bugfixes.patch
+++ /dev/null
@@ -1,271 +0,0 @@
-From 6ea688eff5157785267d2b671cf62d296288847f 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] 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'
-
-[Frank: backport from upstream PR https://github.com/mkoppanen/php-zmq/pull/195]
-Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com>
----
- 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) {
--- 
-2.17.1
-
diff --git a/package/php-zmq/0001-updates-for-php7.4-and-php8.0.patch b/package/php-zmq/0001-updates-for-php7.4-and-php8.0.patch
new file mode 100644
index 0000000000..3c286e3923
--- /dev/null
+++ b/package/php-zmq/0001-updates-for-php7.4-and-php8.0.patch
@@ -0,0 +1,230 @@
+From 4ad1b33e095924bd4ccf79295999dd54edaaac37 Mon Sep 17 00:00:00 2001
+From: Luca Boccassi <luca.boccassi@gmail.com>
+Date: Thu, 5 Mar 2020 22:51:22 +0000
+Subject: [PATCH] updates for php7.4 and php8.0 (#212)
+
+From upstream commit: 4ad1b33e095924bd4ccf79295999dd54edaaac37
+
+* travisci: enabled php7.4 and php8.0
+
+* updates for php7.4 and php8.0
+
+- travisci enabled php7.4 and php8.0
+- removed now unused references to TSRMLS_*
+  These flags were mostly already removed from the
+  php7 codebase but some instances were still present.
+  With php8 these produce compile errors.
+- fix tests for php8 and php7.4
+  New TypeErrors now get handled correctly in the test cases.
+- fix memory corruption in zmq.c
+  The conflicting line causes memory leaks on other php
+  version and causes a segfault on php8 and php7.4
+  The error was provocable with test case
+  021-callbackwarning.phpt. After removing of the line
+  valgrind showed no memory leak, so this line was probably
+  redundant. Also if you compare with zmqsocket constructor
+  this line is also not present.
+
+Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
+Signed-off-by: Adam Duskett <aduskett@gmail.com>
+---
+ php_zmq_private.h                  |  4 ++--
+ tests/016-callbackinvalidargs.phpt |  4 ++++
+ tests/022-highwatermark.phpt       |  6 +++---
+ tests/bug_gh_43.phpt               | 25 +++++++++++++++++--------
+ zmq.c                              |  1 -
+ zmq_device.c                       | 14 +++++++-------
+ zmq_sockopt.c                      |  2 +-
+ 7 files changed, 34 insertions(+), 22 deletions(-)
+
+diff --git a/php_zmq_private.h b/php_zmq_private.h
+index 49630e9..2e5cd3b 100644
+--- a/php_zmq_private.h
++++ b/php_zmq_private.h
+@@ -156,9 +156,9 @@ typedef struct _php_zmq_device_object  {
+ 
+ #define PHP_ZMQ_ERROR_HANDLING_INIT() zend_error_handling error_handling;
+ 
+-#define PHP_ZMQ_ERROR_HANDLING_THROW() zend_replace_error_handling(EH_THROW, php_zmq_socket_exception_sc_entry, &error_handling TSRMLS_CC);
++#define PHP_ZMQ_ERROR_HANDLING_THROW() zend_replace_error_handling(EH_THROW, php_zmq_socket_exception_sc_entry, &error_handling);
+ 
+-#define PHP_ZMQ_ERROR_HANDLING_RESTORE() zend_restore_error_handling(&error_handling TSRMLS_CC);
++#define PHP_ZMQ_ERROR_HANDLING_RESTORE() zend_restore_error_handling(&error_handling);
+ 
+ /* Compatibility macros between zeromq 2.x and 3.x */
+ #ifndef ZMQ_DONTWAIT
+diff --git a/tests/016-callbackinvalidargs.phpt b/tests/016-callbackinvalidargs.phpt
+index a940e41..6bd0e75 100644
+--- a/tests/016-callbackinvalidargs.phpt
++++ b/tests/016-callbackinvalidargs.phpt
+@@ -10,6 +10,8 @@ try {
+ 	echo "Fail\n";
+ } catch (ZMQSocketException $e) {
+ 	echo "OK\n";
++} catch (TypeError $e) {
++ 	echo "OK\n"; // on PHP8
+ }
+ 
+ try {
+@@ -18,6 +20,8 @@ try {
+ 	echo "Fail\n";
+ } catch (ZMQSocketException $e) {
+ 	echo "OK\n";
++} catch (TypeError $e) {
++ 	echo "OK\n"; // on PHP8
+ }
+ 
+ --EXPECT--
+diff --git a/tests/022-highwatermark.phpt b/tests/022-highwatermark.phpt
+index 84be509..c1ff703 100644
+--- a/tests/022-highwatermark.phpt
++++ b/tests/022-highwatermark.phpt
+@@ -1,11 +1,11 @@
+ --TEST--
+ Test that high-watermark works
+ --SKIPIF--
+-<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
+-
++<?php
++require_once(dirname(__FILE__) . '/skipif.inc');
+ if (!defined('ZMQ::SOCKOPT_LINGER'))
+     die ("Skip Not compiled against new enough version");
+-
++?>
+ --FILE--
+ <?php
+ 
+diff --git a/tests/bug_gh_43.phpt b/tests/bug_gh_43.phpt
+index bdc274a..923d074 100644
+--- a/tests/bug_gh_43.phpt
++++ b/tests/bug_gh_43.phpt
+@@ -7,16 +7,25 @@ Test for Github issue #43
+ --FILE--
+ <?php
+ 
++error_reporting(0);
++
+ $context = new ZMQContext (1, false);
+ 
+ $sock1 = new ZMQSocket ($context, ZMQ::SOCKET_PUB);
+ $sock2 = new ZMQSocket ($context, ZMQ::SOCKET_SUB);
+ 
+-$device = new ZMQDevice ($sock1, $sock1, $sock1, $sock1);
+-
+-echo "OK";
+-?>
+-
+---EXPECTF--
+-Warning: ZMQDevice::__construct() expects at most 3 parameters, 4 given in %s/bug_gh_43.php on line %d
+-OK
+\ No newline at end of file
++try {
++    $device = new ZMQDevice ($sock1, $sock1, $sock1, $sock1);
++    // on PHP7 and lower
++    $lastError = error_get_last();
++    if(strpos($lastError['message'], 'ZMQDevice::__construct() expects at most 3 parameters, 4 given') !== false)
++     	echo "OK\n";
++    else{
++        echo "FAIL\n";
++        print_r($lastError);
++    }
++}catch(TypeError $e){
++ 	echo "OK\n"; // on PHP8
++}
++--EXPECT--
++OK
+diff --git a/zmq.c b/zmq.c
+index 942e69b..66196ea 100644
+--- a/zmq.c
++++ b/zmq.c
+@@ -687,7 +687,6 @@ PHP_METHOD(zmqcontext, getsocket)
+ 			if (!php_zmq_connect_callback(return_value, &fci, &fci_cache, persistent_id)) {
+ 				php_zmq_socket_destroy(socket);
+ 				interns->socket = NULL;
+-				zval_dtor(return_value);
+ 				return;
+ 			}
+ 		}
+diff --git a/zmq_device.c b/zmq_device.c
+index c7415c1..534f966 100644
+--- a/zmq_device.c
++++ b/zmq_device.c
+@@ -41,7 +41,7 @@
+ ZEND_EXTERN_MODULE_GLOBALS(php_zmq)
+ 
+ static
+-zend_bool s_invoke_device_cb (php_zmq_device_cb_t *cb, uint64_t current_ts TSRMLS_DC)
++zend_bool s_invoke_device_cb (php_zmq_device_cb_t *cb, uint64_t current_ts)
+ {
+ 	zend_bool retval = 0;
+ 	zval params[1];
+@@ -59,7 +59,7 @@ zend_bool s_invoke_device_cb (php_zmq_device_cb_t *cb, uint64_t current_ts TSRML
+ 	if (zend_call_function(&(cb->fci), &(cb->fci_cache)) == FAILURE) {
+ 		if (!EG(exception)) {
+ 			char *func_name = php_zmq_printable_func(&cb->fci, &cb->fci_cache);
+-			zend_throw_exception_ex(php_zmq_device_exception_sc_entry_get (), 0 TSRMLS_CC, "Failed to invoke device callback %s()", func_name);
++			zend_throw_exception_ex(php_zmq_device_exception_sc_entry_get (), 0, "Failed to invoke device callback %s()", func_name);
+ 			zval_ptr_dtor(&params[0]);
+ 			efree(func_name);
+ 		}
+@@ -94,7 +94,7 @@ int s_capture_message (void *socket, zmq_msg_t *msg, int more)
+ }
+ 
+ static
+-int s_calculate_timeout (php_zmq_device_object *intern TSRMLS_DC)
++int s_calculate_timeout (php_zmq_device_object *intern)
+ {
+ 	int timeout = -1;
+ 	uint64_t current = php_zmq_clock (ZMQ_G (clock_ctx));
+@@ -131,7 +131,7 @@ int s_calculate_timeout (php_zmq_device_object *intern TSRMLS_DC)
+ }
+ 
+ 
+-zend_bool php_zmq_device (php_zmq_device_object *intern TSRMLS_DC)
++zend_bool php_zmq_device (php_zmq_device_object *intern)
+ {
+ 	int errno_;
+ 	uint64_t last_message_received;
+@@ -186,7 +186,7 @@ zend_bool php_zmq_device (php_zmq_device_object *intern TSRMLS_DC)
+ 		uint64_t current_ts = 0;
+ 
+ 		/* Calculate poll_timeout based on idle / timer cb */
+-		int timeout = s_calculate_timeout (intern TSRMLS_CC);
++		int timeout = s_calculate_timeout (intern);
+ 
+ 		rc = zmq_poll(&items [0], 2, timeout);
+ 		if (rc < 0) {
+@@ -205,7 +205,7 @@ zend_bool php_zmq_device (php_zmq_device_object *intern TSRMLS_DC)
+ 		if (intern->timer_cb.initialized && intern->timer_cb.timeout > 0) {
+ 			/* Is it timer to call the timer ? */
+ 			if (intern->timer_cb.scheduled_at <= current_ts) {
+-				if (!s_invoke_device_cb (&intern->timer_cb, current_ts TSRMLS_CC)) {
++				if (!s_invoke_device_cb (&intern->timer_cb, current_ts)) {
+ 					zmq_msg_close (&msg);
+ 					return 1;
+ 				}
+@@ -217,7 +217,7 @@ zend_bool php_zmq_device (php_zmq_device_object *intern TSRMLS_DC)
+ 			/* Is it timer to call the idle callback ? */
+ 			if ((current_ts - last_message_received) >= intern->idle_cb.timeout &&
+ 				intern->idle_cb.scheduled_at <= current_ts) {
+-				if (!s_invoke_device_cb (&intern->idle_cb, current_ts TSRMLS_CC)) {
++				if (!s_invoke_device_cb (&intern->idle_cb, current_ts)) {
+ 					zmq_msg_close (&msg);
+ 					return 1;
+ 				}
+diff --git a/zmq_sockopt.c b/zmq_sockopt.c
+index 1357032..14b59f0 100644
+--- a/zmq_sockopt.c
++++ b/zmq_sockopt.c
+@@ -2036,7 +2036,7 @@ PHP_METHOD(zmqsocket, setsockopt)
+     long key;
+     zval *zv;
+ 
+-    if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lz/", &key, &zv) == FAILURE) {
++    if (zend_parse_parameters(ZEND_NUM_ARGS(), "lz/", &key, &zv) == FAILURE) {
+         return;
+     }
+ 
+-- 
+2.31.1
+
diff --git a/package/php-zmq/0002-fix-for-php-7.3.patch b/package/php-zmq/0002-fix-for-php-7.3.patch
new file mode 100644
index 0000000000..3ca87582cb
--- /dev/null
+++ b/package/php-zmq/0002-fix-for-php-7.3.patch
@@ -0,0 +1,43 @@
+From e0db82c3286da81fa8945894dd10125a528299e4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Gr=C3=A9gory=20PLANCHAT?=
+ <gplanchat@users.noreply.github.com>
+Date: Wed, 8 Jul 2020 10:09:38 +0200
+Subject: [PATCH] Fix for PHP 7.3 (#215)
+
+Co-authored-by: Remi Collet <remi@remirepo.net>
+Signed-off-by: Adam Duskett <aduskett@gmail.com>
+---
+ zmq.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/zmq.c b/zmq.c
+index 66196ea..879704f 100644
+--- a/zmq.c
++++ b/zmq.c
+@@ -235,7 +235,11 @@ 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;
+ 
++#if PHP_VERSION_ID < 70300
+ 		GC_REFCOUNT(&le) = 1;
++#else
++		GC_SET_REFCOUNT(&le, 1);
++#endif
+ 
+ 		/* 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) {
+@@ -535,7 +539,11 @@ 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;
+ 
++#if PHP_VERSION_ID < 70300
+ 	GC_REFCOUNT(&le) = 1;
++#else
++	GC_SET_REFCOUNT(&le, 1);
++#endif
+ 
+ 	plist_key = php_zmq_socket_plist_key(type, persistent_id, use_shared_ctx);
+ 
+-- 
+2.31.1
+
diff --git a/package/php-zmq/0003-fix-for-php-8.0.0beta2.patch b/package/php-zmq/0003-fix-for-php-8.0.0beta2.patch
new file mode 100644
index 0000000000..c5aab16ab7
--- /dev/null
+++ b/package/php-zmq/0003-fix-for-php-8.0.0beta2.patch
@@ -0,0 +1,40 @@
+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
+
+Signed-off-by: Remi Collet <remi@remirepo.net>
+Signed-off-by: Adam Duskett <aduskett@gmail.com>
+---
+ 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) {
-- 
2.31.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 09/11] package/php-geoip: add php8 build support
  2021-06-29 16:50 [Buildroot] [PATCH 01/11] package/php-amqp: bump version to 1.10.2 Adam Duskett
                   ` (6 preceding siblings ...)
  2021-06-29 16:50 ` [Buildroot] [PATCH 08/11] package/php-zmq: add upstream php8 compatibility patches Adam Duskett
@ 2021-06-29 16:50 ` Adam Duskett
  2021-06-29 16:50 ` [Buildroot] [PATCH 10/11] package/php-amqp: add add upstream php8 compatibility patches Adam Duskett
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Adam Duskett @ 2021-06-29 16:50 UTC (permalink / raw)
  To: buildroot

Add a patch that allows php-geoip to compile against php8.

Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
 .../0001-add-build-support-for-php8.patch     | 35 +++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 package/php-geoip/0001-add-build-support-for-php8.patch

diff --git a/package/php-geoip/0001-add-build-support-for-php8.patch b/package/php-geoip/0001-add-build-support-for-php8.patch
new file mode 100644
index 0000000000..5672b00ce8
--- /dev/null
+++ b/package/php-geoip/0001-add-build-support-for-php8.patch
@@ -0,0 +1,35 @@
+From 9500f9964a1ef03890376c61f1b17db88753c8e2 Mon Sep 17 00:00:00 2001
+From: Adam Duskett <aduskett@gmail.com>
+Date: Mon, 28 Jun 2021 12:24:59 -0700
+Subject: [PATCH] add build support for php8
+
+Signed-off-by: Adam Duskett <aduskett@gmail.com>
+---
+ php_geoip.h | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/php_geoip.h b/php_geoip.h
+index 2f67cb6..d19d612 100644
+--- a/php_geoip.h
++++ b/php_geoip.h
+@@ -30,6 +30,17 @@ extern zend_module_entry geoip_module_entry;
+ typedef long zend_long;
+ #endif
+ 
++/* Small change to let it build after a major internal change for php8.0
++ * More info:
++ * https://github.com/php/php-src/blob/php-8.0.0/UPGRADING.INTERNALS#L47
++ */
++#if PHP_MAJOR_VERSION >= 8
++# define TSRMLS_DC
++# define TSRMLS_D
++# define TSRMLS_CC
++# define TSRMLS_C
++# endif
++
+ #ifdef PHP_WIN32
+ #define PHP_GEOIP_API __declspec(dllexport)
+ #else
+-- 
+2.31.1
+
-- 
2.31.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 10/11] package/php-amqp: add add upstream php8 compatibility patches
  2021-06-29 16:50 [Buildroot] [PATCH 01/11] package/php-amqp: bump version to 1.10.2 Adam Duskett
                   ` (7 preceding siblings ...)
  2021-06-29 16:50 ` [Buildroot] [PATCH 09/11] package/php-geoip: add php8 build support Adam Duskett
@ 2021-06-29 16:50 ` Adam Duskett
  2021-06-29 16:50 ` [Buildroot] [PATCH 11/11] package/php: bump version to 8.0.7 Adam Duskett
  2021-07-03 20:03 ` [Buildroot] [PATCH 01/11] package/php-amqp: bump version to 1.10.2 Thomas Petazzoni
  10 siblings, 0 replies; 12+ messages in thread
From: Adam Duskett @ 2021-06-29 16:50 UTC (permalink / raw)
  To: buildroot

These patches are necessary for compiling against php8. These patches also
retain the ability to compile against PHP7.2

Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
 .../0001-add-build-support-for-php-8.patch    |   54 +
 .../php-amqp/0002-more-work-for-php-8.patch   | 1265 +++++++++++++++++
 2 files changed, 1319 insertions(+)
 create mode 100644 package/php-amqp/0001-add-build-support-for-php-8.patch
 create mode 100644 package/php-amqp/0002-more-work-for-php-8.patch

diff --git a/package/php-amqp/0001-add-build-support-for-php-8.patch b/package/php-amqp/0001-add-build-support-for-php-8.patch
new file mode 100644
index 0000000000..6fe09ad3bd
--- /dev/null
+++ b/package/php-amqp/0001-add-build-support-for-php-8.patch
@@ -0,0 +1,54 @@
+From 96cd5cb5eddd3db2faaa3643dad2fe4677d7c438 Mon Sep 17 00:00:00 2001
+From: mmokhi <mokhi64@gmail.com>
+Date: Thu, 30 Jul 2020 11:25:33 +0200
+Subject: [PATCH] Add build support for PHP8.0 (#381)
+
+From upstream commit: 96cd5cb5eddd3db2faaa3643dad2fe4677d7c438
+
+Signed-off-by: mmokhi <mokhi64@gmail.com>
+Signed-off-by: Adam Duskett <aduskett@gmail.com>
+---
+ amqp_envelope.h |  7 +++++++
+ php7_support.h  | 11 +++++++++++
+ 2 files changed, 18 insertions(+)
+
+diff --git a/amqp_envelope.h b/amqp_envelope.h
+index e63a3a5..e315682 100644
+--- a/amqp_envelope.h
++++ b/amqp_envelope.h
+@@ -20,6 +20,13 @@
+   | - Jonathan Tansavatdi                                                |
+   +----------------------------------------------------------------------+
+ */
++
++#if PHP_MAJOR_VERSION >= 7
++        #include "php7_support.h"
++#else
++        #include "php5_support.h"
++#endif
++
+ extern zend_class_entry *amqp_envelope_class_entry;
+ 
+ void convert_amqp_envelope_to_zval(amqp_envelope_t *amqp_envelope, zval *envelope TSRMLS_DC);
+diff --git a/php7_support.h b/php7_support.h
+index 47ce983..c9e8f5b 100644
+--- a/php7_support.h
++++ b/php7_support.h
+@@ -101,6 +101,17 @@ typedef zval PHP5to7_zend_resource_le_t;
+ 
+ #define PHP5to7_ZEND_ACC_FINAL_CLASS ZEND_ACC_FINAL
+ 
++/* Small change to let it build after a major internal change for php8.0
++ * More info:
++ * https://github.com/php/php-src/blob/php-8.0.0alpha3/UPGRADING.INTERNALS#L47
++ */
++#if PHP_MAJOR_VERSION >= 8
++# define TSRMLS_DC
++# define TSRMLS_D
++# define TSRMLS_CC
++# define TSRMLS_C
++# endif
++
+ #endif //PHP_AMQP_PHP7_SUPPORT_H
+ 
+ /*
diff --git a/package/php-amqp/0002-more-work-for-php-8.patch b/package/php-amqp/0002-more-work-for-php-8.patch
new file mode 100644
index 0000000000..3651f5a0d3
--- /dev/null
+++ b/package/php-amqp/0002-more-work-for-php-8.patch
@@ -0,0 +1,1265 @@
+From df1241852b359cf12c346beaa68de202257efdf1 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Wed, 9 Dec 2020 17:00:46 +0100
+Subject: [PATCH] more work for PHP 8 (#383)
+
+* more work for PHP 8
+
+* split test
+
+Signed-off-by: Remi Collet <remi@remirepo.net>
+Signed-off-by: Adam Duskett <aduskett@gmail.com>
+---
+ amqp_basic_properties.c       |  84 +++++++++++++--------------
+ amqp_channel.c                |  49 +++++++++-------
+ amqp_connection.c             | 106 +++++++++++++++++-----------------
+ amqp_connection_resource.c    |  12 ++--
+ amqp_decimal.c                |   8 +--
+ amqp_envelope.c               |  12 ++--
+ amqp_exchange.c               |  22 +++----
+ amqp_queue.c                  |  38 ++++++------
+ amqp_timestamp.c              |   6 +-
+ amqp_type.c                   |   6 +-
+ php5_support.h                |   2 +
+ php7_support.h                |   9 +++
+ php_amqp.h                    |   8 +--
+ tests/amqptimestamp.phpt      |   4 +-
+ tests/amqptimestamp_php8.phpt |  60 +++++++++++++++++++
+ tests/bug_61533.phpt          |   2 +-
+ 16 files changed, 254 insertions(+), 174 deletions(-)
+ create mode 100644 tests/amqptimestamp_php8.phpt
+
+diff --git a/amqp_basic_properties.c b/amqp_basic_properties.c
+index 69b813e..5375f44 100644
+--- a/amqp_basic_properties.c
++++ b/amqp_basic_properties.c
+@@ -70,7 +70,7 @@ void php_amqp_basic_properties_set_empty_headers(zval *obj TSRMLS_DC) {
+     PHP5to7_MAYBE_INIT(headers);
+     PHP5to7_ARRAY_INIT(headers);
+ 
+-    zend_update_property(this_ce, obj, ZEND_STRL("headers"), PHP5to7_MAYBE_PTR(headers) TSRMLS_CC);
++    zend_update_property(this_ce, PHP5to8_OBJ_PROP(obj), ZEND_STRL("headers"), PHP5to7_MAYBE_PTR(headers) TSRMLS_CC);
+ 
+     PHP5to7_MAYBE_DESTROY(headers);
+ }
+@@ -118,29 +118,29 @@ static PHP_METHOD(AMQPBasicProperties, __construct) {
+                              ) == FAILURE) {
+         return;
+     }
+-    zend_update_property_stringl(this_ce, getThis(), ZEND_STRL("content_type"), content_type, content_type_len TSRMLS_CC);
+-    zend_update_property_stringl(this_ce, getThis(), ZEND_STRL("content_encoding"), content_encoding, content_encoding_len TSRMLS_CC);
++    zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("content_type"), content_type, content_type_len TSRMLS_CC);
++    zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("content_encoding"), content_encoding, content_encoding_len TSRMLS_CC);
+ 
+     if (headers != NULL) {
+-        zend_update_property(this_ce, getThis(), ZEND_STRL("headers"), headers TSRMLS_CC);
++        zend_update_property(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("headers"), headers TSRMLS_CC);
+     } else {
+         php_amqp_basic_properties_set_empty_headers(getThis() TSRMLS_CC);
+     }
+ 
+-    zend_update_property_long(this_ce, getThis(), ZEND_STRL("delivery_mode"), delivery_mode TSRMLS_CC);
+-    zend_update_property_long(this_ce, getThis(), ZEND_STRL("priority"), priority TSRMLS_CC);
++    zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("delivery_mode"), delivery_mode TSRMLS_CC);
++    zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("priority"), priority TSRMLS_CC);
+ 
+-    zend_update_property_stringl(this_ce, getThis(), ZEND_STRL("correlation_id"), correlation_id, correlation_id_len TSRMLS_CC);
+-    zend_update_property_stringl(this_ce, getThis(), ZEND_STRL("reply_to"), reply_to, reply_to_len TSRMLS_CC);
+-    zend_update_property_stringl(this_ce, getThis(), ZEND_STRL("expiration"), expiration, expiration_len TSRMLS_CC);
+-    zend_update_property_stringl(this_ce, getThis(), ZEND_STRL("message_id"), message_id, message_id_len TSRMLS_CC);
++    zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("correlation_id"), correlation_id, correlation_id_len TSRMLS_CC);
++    zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("reply_to"), reply_to, reply_to_len TSRMLS_CC);
++    zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("expiration"), expiration, expiration_len TSRMLS_CC);
++    zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("message_id"), message_id, message_id_len TSRMLS_CC);
+ 
+-    zend_update_property_long(this_ce, getThis(), ZEND_STRL("timestamp"), timestamp TSRMLS_CC);
++    zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("timestamp"), timestamp TSRMLS_CC);
+ 
+-    zend_update_property_stringl(this_ce, getThis(), ZEND_STRL("type"), type, type_len TSRMLS_CC);
+-    zend_update_property_stringl(this_ce, getThis(), ZEND_STRL("user_id"), user_id, user_id_len TSRMLS_CC);
+-    zend_update_property_stringl(this_ce, getThis(), ZEND_STRL("app_id"), app_id, app_id_len TSRMLS_CC);
+-    zend_update_property_stringl(this_ce, getThis(), ZEND_STRL("cluster_id"), cluster_id, cluster_id_len TSRMLS_CC);
++    zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("type"), type, type_len TSRMLS_CC);
++    zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("user_id"), user_id, user_id_len TSRMLS_CC);
++    zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("app_id"), app_id, app_id_len TSRMLS_CC);
++    zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("cluster_id"), cluster_id, cluster_id_len TSRMLS_CC);
+ }
+ /* }}} */
+ 
+@@ -460,7 +460,7 @@ void parse_amqp_table(amqp_table_t *table, zval *result TSRMLS_DC) {
+ 				object_init_ex(PHP5to7_MAYBE_PTR(value), amqp_timestamp_class_entry);
+ 
+ 				zend_call_method_with_1_params(
+-						&value,
++						PHP5to8_OBJ_PROP(&value),
+ 						amqp_timestamp_class_entry,
+ 						NULL,
+ 						"__construct",
+@@ -488,7 +488,7 @@ void parse_amqp_table(amqp_table_t *table, zval *result TSRMLS_DC) {
+                 object_init_ex(PHP5to7_MAYBE_PTR(value), amqp_decimal_class_entry);
+ 
+                 zend_call_method_with_2_params(
+-                        &value,
++                        PHP5to8_OBJ_PROP(&value),
+                         amqp_decimal_class_entry,
+                         NULL,
+                         "__construct",
+@@ -525,93 +525,93 @@ void php_amqp_basic_properties_extract(amqp_basic_properties_t *p, zval *obj TSR
+     PHP5to7_ARRAY_INIT(headers);
+ 
+     if (p->_flags & AMQP_BASIC_CONTENT_TYPE_FLAG) {
+-        zend_update_property_stringl(this_ce, obj, ZEND_STRL("content_type"), (const char *) p->content_type.bytes, (PHP5to7_param_str_len_type_t) p->content_type.len TSRMLS_CC);
++        zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(obj), ZEND_STRL("content_type"), (const char *) p->content_type.bytes, (PHP5to7_param_str_len_type_t) p->content_type.len TSRMLS_CC);
+     } else {
+         /* BC */
+-        zend_update_property_stringl(this_ce, obj, ZEND_STRL("content_type"), "", 0 TSRMLS_CC);
++        zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(obj), ZEND_STRL("content_type"), "", 0 TSRMLS_CC);
+     }
+ 
+     if (p->_flags & AMQP_BASIC_CONTENT_ENCODING_FLAG) {
+-        zend_update_property_stringl(this_ce, obj, ZEND_STRL("content_encoding"), (const char *) p->content_encoding.bytes, (PHP5to7_param_str_len_type_t) p->content_encoding.len TSRMLS_CC);
++        zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(obj), ZEND_STRL("content_encoding"), (const char *) p->content_encoding.bytes, (PHP5to7_param_str_len_type_t) p->content_encoding.len TSRMLS_CC);
+     } else {
+         /* BC */
+-        zend_update_property_stringl(this_ce, obj, ZEND_STRL("content_encoding"), "", 0 TSRMLS_CC);
++        zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(obj), ZEND_STRL("content_encoding"), "", 0 TSRMLS_CC);
+     }
+ 
+     if (p->_flags & AMQP_BASIC_HEADERS_FLAG) {
+         parse_amqp_table(&(p->headers), PHP5to7_MAYBE_PTR(headers) TSRMLS_CC);
+     }
+ 
+-    zend_update_property(this_ce, obj, ZEND_STRL("headers"), PHP5to7_MAYBE_PTR(headers) TSRMLS_CC);
++    zend_update_property(this_ce, PHP5to8_OBJ_PROP(obj), ZEND_STRL("headers"), PHP5to7_MAYBE_PTR(headers) TSRMLS_CC);
+ 
+     if (p->_flags & AMQP_BASIC_DELIVERY_MODE_FLAG) {
+-        zend_update_property_long(this_ce, obj, ZEND_STRL("delivery_mode"), (PHP5to7_param_long_type_t) p->delivery_mode TSRMLS_CC);
++        zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(obj), ZEND_STRL("delivery_mode"), (PHP5to7_param_long_type_t) p->delivery_mode TSRMLS_CC);
+     } else {
+         /* BC */
+-        zend_update_property_long(this_ce, obj, ZEND_STRL("delivery_mode"), AMQP_DELIVERY_NONPERSISTENT TSRMLS_CC);
++        zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(obj), ZEND_STRL("delivery_mode"), AMQP_DELIVERY_NONPERSISTENT TSRMLS_CC);
+     }
+ 
+     if (p->_flags & AMQP_BASIC_PRIORITY_FLAG) {
+-        zend_update_property_long(this_ce, obj, ZEND_STRL("priority"), (PHP5to7_param_long_type_t) p->priority TSRMLS_CC);
++        zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(obj), ZEND_STRL("priority"), (PHP5to7_param_long_type_t) p->priority TSRMLS_CC);
+     } else {
+         /* BC */
+-        zend_update_property_long(this_ce, obj, ZEND_STRL("priority"), 0 TSRMLS_CC);
++        zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(obj), ZEND_STRL("priority"), 0 TSRMLS_CC);
+     }
+ 
+     if (p->_flags & AMQP_BASIC_CORRELATION_ID_FLAG) {
+-        zend_update_property_stringl(this_ce, obj, ZEND_STRL("correlation_id"), (const char *) p->correlation_id.bytes, (PHP5to7_param_str_len_type_t) p->correlation_id.len TSRMLS_CC);
++        zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(obj), ZEND_STRL("correlation_id"), (const char *) p->correlation_id.bytes, (PHP5to7_param_str_len_type_t) p->correlation_id.len TSRMLS_CC);
+     } else {
+         /* BC */
+-        zend_update_property_stringl(this_ce, obj, ZEND_STRL("correlation_id"), "", 0 TSRMLS_CC);
++        zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(obj), ZEND_STRL("correlation_id"), "", 0 TSRMLS_CC);
+     }
+ 
+     if (p->_flags & AMQP_BASIC_REPLY_TO_FLAG) {
+-        zend_update_property_stringl(this_ce, obj, ZEND_STRL("reply_to"), (const char *) p->reply_to.bytes, (PHP5to7_param_str_len_type_t) p->reply_to.len TSRMLS_CC);
++        zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(obj), ZEND_STRL("reply_to"), (const char *) p->reply_to.bytes, (PHP5to7_param_str_len_type_t) p->reply_to.len TSRMLS_CC);
+     } else {
+         /* BC */
+-        zend_update_property_stringl(this_ce, obj, ZEND_STRL("reply_to"), "", 0 TSRMLS_CC);
++        zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(obj), ZEND_STRL("reply_to"), "", 0 TSRMLS_CC);
+     }
+ 
+     if (p->_flags & AMQP_BASIC_EXPIRATION_FLAG) {
+-        zend_update_property_stringl(this_ce, obj, ZEND_STRL("expiration"), (const char *) p->expiration.bytes, (PHP5to7_param_str_len_type_t) p->expiration.len TSRMLS_CC);
++        zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(obj), ZEND_STRL("expiration"), (const char *) p->expiration.bytes, (PHP5to7_param_str_len_type_t) p->expiration.len TSRMLS_CC);
+     } else {
+         /* BC */
+-        zend_update_property_stringl(this_ce, obj, ZEND_STRL("expiration"), "", 0 TSRMLS_CC);
++        zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(obj), ZEND_STRL("expiration"), "", 0 TSRMLS_CC);
+     }
+ 
+     if (p->_flags & AMQP_BASIC_MESSAGE_ID_FLAG) {
+-        zend_update_property_stringl(this_ce, obj, ZEND_STRL("message_id"), (const char *) p->message_id.bytes, (PHP5to7_param_str_len_type_t) p->message_id.len TSRMLS_CC);
++        zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(obj), ZEND_STRL("message_id"), (const char *) p->message_id.bytes, (PHP5to7_param_str_len_type_t) p->message_id.len TSRMLS_CC);
+     } else {
+         /* BC */
+-        zend_update_property_stringl(this_ce, obj, ZEND_STRL("message_id"), "", 0 TSRMLS_CC);
++        zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(obj), ZEND_STRL("message_id"), "", 0 TSRMLS_CC);
+     }
+ 
+     if (p->_flags & AMQP_BASIC_TIMESTAMP_FLAG) {
+-        zend_update_property_long(this_ce, obj, ZEND_STRL("timestamp"), (PHP5to7_param_long_type_t) p->timestamp TSRMLS_CC);
++        zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(obj), ZEND_STRL("timestamp"), (PHP5to7_param_long_type_t) p->timestamp TSRMLS_CC);
+     } else {
+         /* BC */
+-        zend_update_property_long(this_ce, obj, ZEND_STRL("timestamp"), 0 TSRMLS_CC);
++        zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(obj), ZEND_STRL("timestamp"), 0 TSRMLS_CC);
+     }
+ 
+     if (p->_flags & AMQP_BASIC_TYPE_FLAG) {
+-        zend_update_property_stringl(this_ce, obj, ZEND_STRL("type"), (const char *) p->type.bytes, (PHP5to7_param_str_len_type_t) p->type.len TSRMLS_CC);
++        zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(obj), ZEND_STRL("type"), (const char *) p->type.bytes, (PHP5to7_param_str_len_type_t) p->type.len TSRMLS_CC);
+     } else {
+         /* BC */
+-        zend_update_property_stringl(this_ce, obj, ZEND_STRL("type"), "", 0 TSRMLS_CC);
++        zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(obj), ZEND_STRL("type"), "", 0 TSRMLS_CC);
+     }
+ 
+     if (p->_flags & AMQP_BASIC_USER_ID_FLAG) {
+-        zend_update_property_stringl(this_ce, obj, ZEND_STRL("user_id"), (const char *) p->user_id.bytes, (PHP5to7_param_str_len_type_t) p->user_id.len TSRMLS_CC);
++        zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(obj), ZEND_STRL("user_id"), (const char *) p->user_id.bytes, (PHP5to7_param_str_len_type_t) p->user_id.len TSRMLS_CC);
+     } else {
+         /* BC */
+-        zend_update_property_stringl(this_ce, obj, ZEND_STRL("user_id"), "", 0 TSRMLS_CC);
++        zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(obj), ZEND_STRL("user_id"), "", 0 TSRMLS_CC);
+     }
+ 
+     if (p->_flags & AMQP_BASIC_APP_ID_FLAG) {
+-        zend_update_property_stringl(this_ce, obj, ZEND_STRL("app_id"), (const char *) p->app_id.bytes, (PHP5to7_param_str_len_type_t) p->app_id.len TSRMLS_CC);
++        zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(obj), ZEND_STRL("app_id"), (const char *) p->app_id.bytes, (PHP5to7_param_str_len_type_t) p->app_id.len TSRMLS_CC);
+     } else {
+         /* BC */
+-        zend_update_property_stringl(this_ce, obj, ZEND_STRL("app_id"), "", 0 TSRMLS_CC);
++        zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(obj), ZEND_STRL("app_id"), "", 0 TSRMLS_CC);
+     }
+ 
+     PHP5to7_MAYBE_DESTROY(headers);
+diff --git a/amqp_channel.c b/amqp_channel.c
+index ef9552a..493c6d3 100644
+--- a/amqp_channel.c
++++ b/amqp_channel.c
+@@ -152,10 +152,15 @@ static zval * php_amqp_get_fci_gc_data(zend_fcall_info *fci, zval *gc_data) {
+ 	return gc_data;
+ }
+ 
++#if PHP_MAJOR_VERSION < 8
+ static HashTable *amqp_channel_gc(zval *object, zval **table, int *n) /* {{{ */
+ {
+-	amqp_channel_object *channel = PHP_AMQP_GET_CHANNEL(object);
+-
++    amqp_channel_object *channel = PHP_AMQP_GET_CHANNEL(object);
++#else
++static HashTable *amqp_channel_gc(zend_object *object, zval **table, int *n) /* {{{ */
++{
++	amqp_channel_object *channel = php_amqp_channel_object_fetch(object);
++#endif
+ 	int basic_return_cnt = php_amqp_get_fci_gc_data_count(&channel->callbacks.basic_return.fci);
+ 	int basic_ack_cnt    = php_amqp_get_fci_gc_data_count(&channel->callbacks.basic_ack.fci);
+ 	int basic_nack_cnt   = php_amqp_get_fci_gc_data_count(&channel->callbacks.basic_nack.fci);
+@@ -249,7 +254,7 @@ static HashTable *amqp_channel_gc(zval *object, zval ***table, int *n TSRMLS_DC)
+ 	*table = channel->gc_data;
+ 	*n     = cnt;
+ 
+-	return zend_std_get_properties(object TSRMLS_CC);
++	return zend_std_get_properties(PHP5to8_OBJ_PROP(object) TSRMLS_CC);
+ } /* }}} */
+ 
+ #endif
+@@ -331,7 +336,7 @@ static PHP_METHOD(amqp_channel_class, __construct)
+ 	amqp_connection_object *connection;
+ 
+ 	/* Parse out the method parameters */
+-	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", &connection_object) == FAILURE) {
++	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &connection_object, amqp_connection_class_entry) == FAILURE) {
+ 		zend_throw_exception(amqp_channel_exception_class_entry, "Parameter must be an instance of AMQPConnection.", 0 TSRMLS_CC);
+ 		RETURN_NULL();
+ 	}
+@@ -341,7 +346,7 @@ static PHP_METHOD(amqp_channel_class, __construct)
+ 	PHP5to7_MAYBE_INIT(consumers);
+ 	PHP5to7_ARRAY_INIT(consumers);
+ 
+-	zend_update_property(this_ce, getThis(), ZEND_STRL("consumers"), PHP5to7_MAYBE_PTR(consumers) TSRMLS_CC);
++	zend_update_property(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("consumers"), PHP5to7_MAYBE_PTR(consumers) TSRMLS_CC);
+ 
+ 	PHP5to7_MAYBE_DESTROY(consumers);
+ 
+@@ -351,16 +356,16 @@ static PHP_METHOD(amqp_channel_class, __construct)
+ #endif
+ 
+ 	/* Set the prefetch count */
+-	zend_update_property_long(this_ce, getThis(), ZEND_STRL("prefetch_count"), INI_INT("amqp.prefetch_count") TSRMLS_CC);
++	zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("prefetch_count"), INI_INT("amqp.prefetch_count") TSRMLS_CC);
+ 
+ 	/* Set the prefetch size */
+-	zend_update_property_long(this_ce, getThis(), ZEND_STRL("prefetch_size"), INI_INT("amqp.prefetch_size") TSRMLS_CC);
++	zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("prefetch_size"), INI_INT("amqp.prefetch_size") TSRMLS_CC);
+ 
+ 	/* Set the global prefetch count */
+-	zend_update_property_long(this_ce, getThis(), ZEND_STRL("global_prefetch_count"), INI_INT("amqp.global_prefetch_count") TSRMLS_CC);
++	zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("global_prefetch_count"), INI_INT("amqp.global_prefetch_count") TSRMLS_CC);
+ 
+ 	/* Set the global prefetch size */
+-	zend_update_property_long(this_ce, getThis(), ZEND_STRL("global_prefetch_size"), INI_INT("amqp.global_prefetch_size") TSRMLS_CC);
++	zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("global_prefetch_size"), INI_INT("amqp.global_prefetch_size") TSRMLS_CC);
+ 
+ 	/* Pull out and verify the connection */
+ 	connection = PHP_AMQP_GET_CONNECTION(connection_object);
+@@ -376,7 +381,7 @@ static PHP_METHOD(amqp_channel_class, __construct)
+ 		return;
+ 	}
+ 
+-	zend_update_property(this_ce, getThis(), ZEND_STRL("connection"), connection_object TSRMLS_CC);
++	zend_update_property(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("connection"), connection_object TSRMLS_CC);
+ 
+ 	channel_resource = (amqp_channel_resource*)ecalloc(1, sizeof(amqp_channel_resource));
+ 	channel->channel_resource = channel_resource;
+@@ -580,8 +585,8 @@ static PHP_METHOD(amqp_channel_class, setPrefetchCount)
+ 	}
+ 
+ 	/* Set the prefetch count - the implication is to disable the size */
+-	zend_update_property_long(this_ce, getThis(), ZEND_STRL("prefetch_count"), prefetch_count TSRMLS_CC);
+-	zend_update_property_long(this_ce, getThis(), ZEND_STRL("prefetch_size"), 0 TSRMLS_CC);
++	zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("prefetch_count"), prefetch_count TSRMLS_CC);
++	zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("prefetch_size"), 0 TSRMLS_CC);
+ 
+ 	RETURN_TRUE;
+ }
+@@ -659,8 +664,8 @@ static PHP_METHOD(amqp_channel_class, setPrefetchSize)
+ 	}
+ 
+ 	/* Set the prefetch size - the implication is to disable the count */
+-	zend_update_property_long(this_ce, getThis(), ZEND_STRL("prefetch_count"), 0 TSRMLS_CC);
+-	zend_update_property_long(this_ce, getThis(), ZEND_STRL("prefetch_size"), prefetch_size TSRMLS_CC);
++	zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("prefetch_count"), 0 TSRMLS_CC);
++	zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("prefetch_size"), prefetch_size TSRMLS_CC);
+ 
+ 	RETURN_TRUE;
+ }
+@@ -715,8 +720,8 @@ static PHP_METHOD(amqp_channel_class, setGlobalPrefetchCount)
+ 	}
+ 
+ 	/* Set the global prefetch count - the implication is to disable the size */
+-	zend_update_property_long(this_ce, getThis(), ZEND_STRL("global_prefetch_count"), global_prefetch_count TSRMLS_CC);
+-	zend_update_property_long(this_ce, getThis(), ZEND_STRL("global_prefetch_size"), 0 TSRMLS_CC);
++	zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("global_prefetch_count"), global_prefetch_count TSRMLS_CC);
++	zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("global_prefetch_size"), 0 TSRMLS_CC);
+ 
+ 	RETURN_TRUE;
+ }
+@@ -771,8 +776,8 @@ static PHP_METHOD(amqp_channel_class, setGlobalPrefetchSize)
+ 	}
+ 
+ 	/* Set the global prefetch size - the implication is to disable the count */
+-	zend_update_property_long(this_ce, getThis(), ZEND_STRL("global_prefetch_count"), 0 TSRMLS_CC);
+-	zend_update_property_long(this_ce, getThis(), ZEND_STRL("global_prefetch_size"), global_prefetch_size TSRMLS_CC);
++	zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("global_prefetch_count"), 0 TSRMLS_CC);
++	zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("global_prefetch_size"), global_prefetch_size TSRMLS_CC);
+ 
+ 	RETURN_TRUE;
+ }
+@@ -808,11 +813,11 @@ static PHP_METHOD(amqp_channel_class, qos)
+ 
+ 	/* Set the prefetch size and prefetch count */
+ 	if (global) {
+-		zend_update_property_long(this_ce, getThis(), ZEND_STRL("global_prefetch_size"), prefetch_size TSRMLS_CC);
+-		zend_update_property_long(this_ce, getThis(), ZEND_STRL("global_prefetch_count"), prefetch_count TSRMLS_CC);
++		zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("global_prefetch_size"), prefetch_size TSRMLS_CC);
++		zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("global_prefetch_count"), prefetch_count TSRMLS_CC);
+ 	} else {
+-		zend_update_property_long(this_ce, getThis(), ZEND_STRL("prefetch_size"), prefetch_size TSRMLS_CC);
+-		zend_update_property_long(this_ce, getThis(), ZEND_STRL("prefetch_count"), prefetch_count TSRMLS_CC);
++		zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("prefetch_size"), prefetch_size TSRMLS_CC);
++		zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("prefetch_count"), prefetch_count TSRMLS_CC);
+ 	}
+ 
+ 	/* If we are already connected, set the new prefetch count */
+diff --git a/amqp_connection.c b/amqp_connection.c
+index 5891a4f..466501a 100644
+--- a/amqp_connection.c
++++ b/amqp_connection.c
+@@ -68,9 +68,9 @@ zend_object_handlers amqp_connection_object_handlers;
+ 		convert_to_string(PHP5to7_MAYBE_DEREF(zdata)); \
+ 	} \
+ 	if (zdata && Z_STRLEN_P(PHP5to7_MAYBE_DEREF(zdata)) > 0) { \
+-		zend_update_property_string(this_ce, getThis(), ZEND_STRL(name), Z_STRVAL_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC); \
++		zend_update_property_string(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL(name), Z_STRVAL_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC); \
+ 	} else { \
+-		zend_update_property_string(this_ce, getThis(), ZEND_STRL(name), INI_STR("amqp." name) TSRMLS_CC); \
++		zend_update_property_string(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL(name), INI_STR("amqp." name) TSRMLS_CC); \
+ 	}
+ 
+ #define PHP_AMQP_EXTRACT_CONNECTION_BOOL(name) \
+@@ -80,9 +80,9 @@ zend_object_handlers amqp_connection_object_handlers;
+ 		convert_to_long(PHP5to7_MAYBE_DEREF(zdata)); \
+ 	} \
+ 	if (zdata) { \
+-		zend_update_property_bool(this_ce, getThis(), ZEND_STRL(name), Z_LVAL_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC); \
++		zend_update_property_bool(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL(name), Z_LVAL_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC); \
+ 	} else { \
+-		zend_update_property_bool(this_ce, getThis(), ZEND_STRL(name), INI_INT("amqp." name) TSRMLS_CC); \
++		zend_update_property_bool(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL(name), INI_INT("amqp." name) TSRMLS_CC); \
+ 	}
+ 
+ static int php_amqp_connection_resource_deleter(PHP5to7_zend_resource_le_t *el, amqp_connection_resource *connection_resource TSRMLS_DC)
+@@ -344,13 +344,13 @@ static PHP_METHOD(amqp_connection_class, __construct)
+ 	/* Validate the given login */
+ 	if (zdata && Z_STRLEN_P(PHP5to7_MAYBE_DEREF(zdata)) > 0) {
+ 		if (Z_STRLEN_P(PHP5to7_MAYBE_DEREF(zdata)) < 128) {
+-			zend_update_property(this_ce, getThis(), ZEND_STRL("login"), PHP5to7_MAYBE_DEREF(zdata)TSRMLS_CC);
++			zend_update_property(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("login"), PHP5to7_MAYBE_DEREF(zdata)TSRMLS_CC);
+ 		} else {
+ 			zend_throw_exception(amqp_connection_exception_class_entry, "Parameter 'login' exceeds 128 character limit.", 0 TSRMLS_CC);
+ 			return;
+ 		}
+ 	} else {
+-		zend_update_property_stringl(this_ce, getThis(), ZEND_STRL("login"), INI_STR("amqp.login"), (PHP5to7_param_str_len_type_t) (strlen(INI_STR("amqp.login")) > 128 ? 128 : strlen(INI_STR("amqp.login"))) TSRMLS_CC);
++		zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("login"), INI_STR("amqp.login"), (PHP5to7_param_str_len_type_t) (strlen(INI_STR("amqp.login")) > 128 ? 128 : strlen(INI_STR("amqp.login"))) TSRMLS_CC);
+ 	}
+ 
+ 	/* Pull the password out of the $params array */
+@@ -362,13 +362,13 @@ static PHP_METHOD(amqp_connection_class, __construct)
+ 	/* Validate the given password */
+ 	if (zdata && Z_STRLEN_P(PHP5to7_MAYBE_DEREF(zdata)) > 0) {
+ 		if (Z_STRLEN_P(PHP5to7_MAYBE_DEREF(zdata)) < 128) {
+-			zend_update_property_stringl(this_ce, getThis(), ZEND_STRL("password"), Z_STRVAL_P(PHP5to7_MAYBE_DEREF(zdata)), Z_STRLEN_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC);
++			zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("password"), Z_STRVAL_P(PHP5to7_MAYBE_DEREF(zdata)), Z_STRLEN_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC);
+ 		} else {
+ 			zend_throw_exception(amqp_connection_exception_class_entry, "Parameter 'password' exceeds 128 character limit.", 0 TSRMLS_CC);
+ 			return;
+ 		}
+ 	} else {
+-		zend_update_property_stringl(this_ce, getThis(), ZEND_STRL("password"), INI_STR("amqp.password"), (PHP5to7_param_str_len_type_t) (strlen(INI_STR("amqp.password")) > 128 ? 128 : strlen(INI_STR("amqp.password"))) TSRMLS_CC);
++		zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("password"), INI_STR("amqp.password"), (PHP5to7_param_str_len_type_t) (strlen(INI_STR("amqp.password")) > 128 ? 128 : strlen(INI_STR("amqp.password"))) TSRMLS_CC);
+ 	}
+ 
+ 	/* Pull the host out of the $params array */
+@@ -380,13 +380,13 @@ static PHP_METHOD(amqp_connection_class, __construct)
+ 	/* Validate the given host */
+ 	if (zdata && Z_STRLEN_P(PHP5to7_MAYBE_DEREF(zdata)) > 0) {
+ 		if (Z_STRLEN_P(PHP5to7_MAYBE_DEREF(zdata)) < 128) {
+-			zend_update_property_stringl(this_ce, getThis(), ZEND_STRL("host"), Z_STRVAL_P(PHP5to7_MAYBE_DEREF(zdata)), Z_STRLEN_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC);
++			zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("host"), Z_STRVAL_P(PHP5to7_MAYBE_DEREF(zdata)), Z_STRLEN_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC);
+ 		} else {
+ 			zend_throw_exception(amqp_connection_exception_class_entry, "Parameter 'host' exceeds 128 character limit.", 0 TSRMLS_CC);
+ 			return;
+ 		}
+ 	} else {
+-		zend_update_property_stringl(this_ce, getThis(), ZEND_STRL("host"), INI_STR("amqp.host"), (PHP5to7_param_str_len_type_t) (strlen(INI_STR("amqp.host")) > 128 ? 128 : strlen(INI_STR("amqp.host"))) TSRMLS_CC);
++		zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("host"), INI_STR("amqp.host"), (PHP5to7_param_str_len_type_t) (strlen(INI_STR("amqp.host")) > 128 ? 128 : strlen(INI_STR("amqp.host"))) TSRMLS_CC);
+ 	}
+ 
+ 	/* Pull the vhost out of the $params array */
+@@ -398,25 +398,25 @@ static PHP_METHOD(amqp_connection_class, __construct)
+ 	/* Validate the given vhost */
+ 	if (zdata && Z_STRLEN_P(PHP5to7_MAYBE_DEREF(zdata)) > 0) {
+ 		if (Z_STRLEN_P(PHP5to7_MAYBE_DEREF(zdata)) < 128) {
+-			zend_update_property_stringl(this_ce, getThis(), ZEND_STRL("vhost"), Z_STRVAL_P(PHP5to7_MAYBE_DEREF(zdata)), Z_STRLEN_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC);
++			zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("vhost"), Z_STRVAL_P(PHP5to7_MAYBE_DEREF(zdata)), Z_STRLEN_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC);
+ 		} else {
+ 			zend_throw_exception(amqp_connection_exception_class_entry, "Parameter 'vhost' exceeds 128 character limit.", 0 TSRMLS_CC);
+ 			return;
+ 		}
+ 	} else {
+-		zend_update_property_stringl(this_ce, getThis(), ZEND_STRL("vhost"), INI_STR("amqp.vhost"), (PHP5to7_param_str_len_type_t) (strlen(INI_STR("amqp.vhost")) > 128 ? 128 : strlen(INI_STR("amqp.vhost"))) TSRMLS_CC);
++		zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("vhost"), INI_STR("amqp.vhost"), (PHP5to7_param_str_len_type_t) (strlen(INI_STR("amqp.vhost")) > 128 ? 128 : strlen(INI_STR("amqp.vhost"))) TSRMLS_CC);
+ 
+ 	}
+ 
+-	zend_update_property_long(this_ce, getThis(), ZEND_STRL("port"), INI_INT("amqp.port") TSRMLS_CC);
++	zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("port"), INI_INT("amqp.port") TSRMLS_CC);
+ 
+ 	if (ini_arr && PHP5to7_ZEND_HASH_FIND(HASH_OF(ini_arr), "port", sizeof("port"), zdata)) {
+ 		SEPARATE_ZVAL(zdata);
+ 		convert_to_long(PHP5to7_MAYBE_DEREF(zdata));
+-		zend_update_property_long(this_ce, getThis(), ZEND_STRL("port"), Z_LVAL_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC);
++		zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("port"), Z_LVAL_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC);
+ 	}
+ 
+-	zend_update_property_double(this_ce, getThis(), ZEND_STRL("read_timeout"), INI_FLT("amqp.read_timeout") TSRMLS_CC);
++	zend_update_property_double(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("read_timeout"), INI_FLT("amqp.read_timeout") TSRMLS_CC);
+ 
+ 	if (ini_arr && PHP5to7_ZEND_HASH_FIND(HASH_OF(ini_arr), "read_timeout", sizeof("read_timeout"), zdata)) {
+ 		SEPARATE_ZVAL(zdata);
+@@ -424,7 +424,7 @@ static PHP_METHOD(amqp_connection_class, __construct)
+ 		if (Z_DVAL_P(PHP5to7_MAYBE_DEREF(zdata)) < 0) {
+ 			zend_throw_exception(amqp_connection_exception_class_entry, "Parameter 'read_timeout' must be greater than or equal to zero.", 0 TSRMLS_CC);
+ 		} else {
+-			zend_update_property_double(this_ce, getThis(), ZEND_STRL("read_timeout"), Z_DVAL_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC);
++			zend_update_property_double(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("read_timeout"), Z_DVAL_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC);
+ 		}
+ 
+ 		if (ini_arr && PHP5to7_ZEND_HASH_FIND(HASH_OF(ini_arr), "timeout", sizeof("timeout"), zdata)) {
+@@ -441,7 +441,7 @@ static PHP_METHOD(amqp_connection_class, __construct)
+ 		if (Z_DVAL_P(PHP5to7_MAYBE_DEREF(zdata)) < 0) {
+ 			zend_throw_exception(amqp_connection_exception_class_entry, "Parameter 'timeout' must be greater than or equal to zero.", 0 TSRMLS_CC);
+ 		} else {
+-			zend_update_property_double(this_ce, getThis(), ZEND_STRL("read_timeout"), Z_DVAL_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC);
++			zend_update_property_double(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("read_timeout"), Z_DVAL_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC);
+ 		}
+ 	} else {
+ 
+@@ -450,17 +450,17 @@ static PHP_METHOD(amqp_connection_class, __construct)
+ 			php_error_docref(NULL TSRMLS_CC, E_DEPRECATED, "INI setting 'amqp.timeout' is deprecated; use 'amqp.read_timeout' instead");
+ 
+ 			if (strcmp(DEFAULT_READ_TIMEOUT, INI_STR("amqp.read_timeout")) == 0) {
+-				zend_update_property_double(this_ce, getThis(), ZEND_STRL("read_timeout"), INI_FLT("amqp.timeout") TSRMLS_CC);
++				zend_update_property_double(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("read_timeout"), INI_FLT("amqp.timeout") TSRMLS_CC);
+ 			} else {
+ 				php_error_docref(NULL TSRMLS_CC, E_NOTICE, "INI setting 'amqp.read_timeout' will be used instead of 'amqp.timeout'");
+-				zend_update_property_double(this_ce, getThis(), ZEND_STRL("read_timeout"), INI_FLT("amqp.read_timeout") TSRMLS_CC);
++				zend_update_property_double(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("read_timeout"), INI_FLT("amqp.read_timeout") TSRMLS_CC);
+ 			}
+ 		} else {
+-			zend_update_property_double(this_ce, getThis(), ZEND_STRL("read_timeout"), INI_FLT("amqp.read_timeout") TSRMLS_CC);
++			zend_update_property_double(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("read_timeout"), INI_FLT("amqp.read_timeout") TSRMLS_CC);
+ 		}
+ 	}
+ 
+-	zend_update_property_double(this_ce, getThis(), ZEND_STRL("write_timeout"), INI_FLT("amqp.write_timeout") TSRMLS_CC);
++	zend_update_property_double(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("write_timeout"), INI_FLT("amqp.write_timeout") TSRMLS_CC);
+ 
+ 	if (ini_arr && PHP5to7_ZEND_HASH_FIND(HASH_OF(ini_arr), "write_timeout", sizeof("write_timeout"), zdata)) {
+ 		SEPARATE_ZVAL(zdata);
+@@ -468,11 +468,11 @@ static PHP_METHOD(amqp_connection_class, __construct)
+ 		if (Z_DVAL_P(PHP5to7_MAYBE_DEREF(zdata)) < 0) {
+ 			zend_throw_exception(amqp_connection_exception_class_entry, "Parameter 'write_timeout' must be greater than or equal to zero.", 0 TSRMLS_CC);
+ 		} else {
+-			zend_update_property_double(this_ce, getThis(), ZEND_STRL("write_timeout"), Z_DVAL_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC);
++			zend_update_property_double(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("write_timeout"), Z_DVAL_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC);
+ 		}
+ 	}
+ 
+-	zend_update_property_double(this_ce, getThis(), ZEND_STRL("rpc_timeout"), INI_FLT("amqp.rpc_timeout") TSRMLS_CC);
++	zend_update_property_double(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("rpc_timeout"), INI_FLT("amqp.rpc_timeout") TSRMLS_CC);
+ 
+ 	if (ini_arr && PHP5to7_ZEND_HASH_FIND(HASH_OF(ini_arr), "rpc_timeout", sizeof("rpc_timeout"), zdata)) {
+ 		SEPARATE_ZVAL(zdata);
+@@ -480,11 +480,11 @@ static PHP_METHOD(amqp_connection_class, __construct)
+ 		if (Z_DVAL_P(PHP5to7_MAYBE_DEREF(zdata)) < 0) {
+ 			zend_throw_exception(amqp_connection_exception_class_entry, "Parameter 'rpc_timeout' must be greater than or equal to zero.", 0 TSRMLS_CC);
+ 		} else {
+-			zend_update_property_double(this_ce, getThis(), ZEND_STRL("rpc_timeout"), Z_DVAL_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC);
++			zend_update_property_double(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("rpc_timeout"), Z_DVAL_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC);
+ 		}
+ 	}
+ 
+-	zend_update_property_double(this_ce, getThis(), ZEND_STRL("connect_timeout"), INI_FLT("amqp.connect_timeout") TSRMLS_CC);
++	zend_update_property_double(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("connect_timeout"), INI_FLT("amqp.connect_timeout") TSRMLS_CC);
+ 
+ 	if (ini_arr && PHP5to7_ZEND_HASH_FIND(HASH_OF(ini_arr), "connect_timeout", sizeof("connect_timeout"), zdata)) {
+ 		SEPARATE_ZVAL(zdata);
+@@ -492,12 +492,12 @@ static PHP_METHOD(amqp_connection_class, __construct)
+ 		if (Z_DVAL_P(PHP5to7_MAYBE_DEREF(zdata)) < 0) {
+ 			zend_throw_exception(amqp_connection_exception_class_entry, "Parameter 'connect_timeout' must be greater than or equal to zero.", 0 TSRMLS_CC);
+ 		} else {
+-			zend_update_property_double(this_ce, getThis(), ZEND_STRL("connect_timeout"), Z_DVAL_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC);
++			zend_update_property_double(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("connect_timeout"), Z_DVAL_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC);
+ 
+ 		}
+ 	}
+ 
+-	zend_update_property_long(this_ce, getThis(), ZEND_STRL("channel_max"), INI_INT("amqp.channel_max") TSRMLS_CC);
++	zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("channel_max"), INI_INT("amqp.channel_max") TSRMLS_CC);
+ 
+ 	if (ini_arr && PHP5to7_ZEND_HASH_FIND(HASH_OF(ini_arr), "channel_max", sizeof("channel_max"), zdata)) {
+ 		SEPARATE_ZVAL(zdata);
+@@ -506,14 +506,14 @@ static PHP_METHOD(amqp_connection_class, __construct)
+ 			zend_throw_exception(amqp_connection_exception_class_entry, "Parameter 'channel_max' is out of range.", 0 TSRMLS_CC);
+ 		} else {
+ 			if(Z_LVAL_P(PHP5to7_MAYBE_DEREF(zdata)) == 0) {
+-				zend_update_property_long(this_ce, getThis(), ZEND_STRL("channel_max"), PHP_AMQP_DEFAULT_CHANNEL_MAX TSRMLS_CC);
++				zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("channel_max"), PHP_AMQP_DEFAULT_CHANNEL_MAX TSRMLS_CC);
+ 			} else {
+-				zend_update_property_long(this_ce, getThis(), ZEND_STRL("channel_max"), Z_LVAL_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC);
++				zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("channel_max"), Z_LVAL_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC);
+ 			}
+ 		}
+ 	}
+ 
+-	zend_update_property_long(this_ce, getThis(), ZEND_STRL("frame_max"), INI_INT("amqp.frame_max") TSRMLS_CC);
++	zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("frame_max"), INI_INT("amqp.frame_max") TSRMLS_CC);
+ 
+ 	if (ini_arr && PHP5to7_ZEND_HASH_FIND(HASH_OF(ini_arr), "frame_max", sizeof("frame_max"), zdata)) {
+ 		SEPARATE_ZVAL(zdata);
+@@ -522,14 +522,14 @@ static PHP_METHOD(amqp_connection_class, __construct)
+ 			zend_throw_exception(amqp_connection_exception_class_entry, "Parameter 'frame_max' is out of range.", 0 TSRMLS_CC);
+ 		} else {
+ 			if(Z_LVAL_P(PHP5to7_MAYBE_DEREF(zdata)) == 0) {
+-				zend_update_property_long(this_ce, getThis(), ZEND_STRL("frame_max"), PHP_AMQP_DEFAULT_FRAME_MAX TSRMLS_CC);
++				zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("frame_max"), PHP_AMQP_DEFAULT_FRAME_MAX TSRMLS_CC);
+ 			} else {
+-				zend_update_property_long(this_ce, getThis(), ZEND_STRL("frame_max"), Z_LVAL_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC);
++				zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("frame_max"), Z_LVAL_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC);
+ 			}
+ 		}
+ 	}
+ 
+-	zend_update_property_long(this_ce, getThis(), ZEND_STRL("heartbeat"), INI_INT("amqp.heartbeat") TSRMLS_CC);
++	zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("heartbeat"), INI_INT("amqp.heartbeat") TSRMLS_CC);
+ 
+ 	if (ini_arr && PHP5to7_ZEND_HASH_FIND(HASH_OF(ini_arr), "heartbeat", sizeof("heartbeat"), zdata)) {
+ 		SEPARATE_ZVAL(zdata);
+@@ -537,16 +537,16 @@ static PHP_METHOD(amqp_connection_class, __construct)
+ 		if (Z_LVAL_P(PHP5to7_MAYBE_DEREF(zdata)) < 0 || Z_LVAL_P(PHP5to7_MAYBE_DEREF(zdata)) > PHP_AMQP_MAX_HEARTBEAT) {
+ 			zend_throw_exception(amqp_connection_exception_class_entry, "Parameter 'heartbeat' is out of range.", 0 TSRMLS_CC);
+ 		} else {
+-			zend_update_property_long(this_ce, getThis(), ZEND_STRL("heartbeat"), Z_LVAL_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC);
++			zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("heartbeat"), Z_LVAL_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC);
+ 		}
+ 	}
+ 
+-	zend_update_property_long(this_ce, getThis(), ZEND_STRL("sasl_method"), INI_INT("amqp.sasl_method") TSRMLS_CC);
++	zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("sasl_method"), INI_INT("amqp.sasl_method") TSRMLS_CC);
+ 
+ 	if (ini_arr && PHP5to7_ZEND_HASH_FIND(HASH_OF(ini_arr), "sasl_method", sizeof("sasl_method"), zdata)) {
+ 		SEPARATE_ZVAL(zdata);
+ 		convert_to_long(PHP5to7_MAYBE_DEREF(zdata));
+-		zend_update_property_long(this_ce, getThis(), ZEND_STRL("sasl_method"), Z_LVAL_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC);
++		zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("sasl_method"), Z_LVAL_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC);
+ 	}
+ 
+ 
+@@ -563,7 +563,7 @@ static PHP_METHOD(amqp_connection_class, __construct)
+ 		convert_to_string(PHP5to7_MAYBE_DEREF(zdata));
+ 	}
+ 	if (zdata && Z_STRLEN_P(PHP5to7_MAYBE_DEREF(zdata)) > 0) {
+-		zend_update_property_string(this_ce, getThis(), ZEND_STRL("connection_name"), Z_STRVAL_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC);
++		zend_update_property_string(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("connection_name"), Z_STRVAL_P(PHP5to7_MAYBE_DEREF(zdata)) TSRMLS_CC);
+ 	}
+ }
+ /* }}} */
+@@ -789,7 +789,7 @@ static PHP_METHOD(amqp_connection_class, setLogin)
+ 		return;
+ 	}
+ 
+-	zend_update_property_stringl(this_ce, getThis(), ZEND_STRL("login"), login, login_len TSRMLS_CC);
++	zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("login"), login, login_len TSRMLS_CC);
+ 
+ 	RETURN_TRUE;
+ }
+@@ -823,7 +823,7 @@ static PHP_METHOD(amqp_connection_class, setPassword)
+ 		return;
+ 	}
+ 
+-	zend_update_property_stringl(this_ce, getThis(), ZEND_STRL("password"), password, password_len TSRMLS_CC);
++	zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("password"), password, password_len TSRMLS_CC);
+ 
+ 	RETURN_TRUE;
+ }
+@@ -858,7 +858,7 @@ static PHP_METHOD(amqp_connection_class, setHost)
+ 		return;
+ 	}
+ 
+-	zend_update_property_stringl(this_ce, getThis(), ZEND_STRL("host"), host, host_len TSRMLS_CC);
++	zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("host"), host, host_len TSRMLS_CC);
+ 
+ 	RETURN_TRUE;
+ }
+@@ -910,7 +910,7 @@ static PHP_METHOD(amqp_connection_class, setPort)
+ 		return;
+ 	}
+ 
+-	zend_update_property_long(this_ce, getThis(), ZEND_STRL("port"), port TSRMLS_CC);
++	zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("port"), port TSRMLS_CC);
+ 
+ 	RETURN_TRUE;
+ }
+@@ -943,7 +943,7 @@ static PHP_METHOD(amqp_connection_class, setVhost)
+ 		return;
+ 	}
+ 
+-	zend_update_property_stringl(this_ce, getThis(), ZEND_STRL("vhost"), vhost, vhost_len TSRMLS_CC);
++	zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("vhost"), vhost, vhost_len TSRMLS_CC);
+ 
+ 	RETURN_TRUE;
+ }
+@@ -986,7 +986,7 @@ static PHP_METHOD(amqp_connection_class, setTimeout)
+ 	/* Get the connection object out of the store */
+ 	connection = PHP_AMQP_GET_CONNECTION(getThis());
+ 
+-	zend_update_property_double(this_ce, getThis(), ZEND_STRL("read_timeout"), read_timeout TSRMLS_CC);
++	zend_update_property_double(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("read_timeout"), read_timeout TSRMLS_CC);
+ 
+ 	if (connection->connection_resource && connection->connection_resource->is_connected) {
+ 		if (php_amqp_set_resource_read_timeout(connection->connection_resource, read_timeout TSRMLS_CC) == 0) {
+@@ -1032,7 +1032,7 @@ static PHP_METHOD(amqp_connection_class, setReadTimeout)
+ 	/* Get the connection object out of the store */
+ 	connection = PHP_AMQP_GET_CONNECTION(getThis());
+ 
+-	zend_update_property_double(this_ce, getThis(), ZEND_STRL("read_timeout"), read_timeout TSRMLS_CC);
++	zend_update_property_double(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("read_timeout"), read_timeout TSRMLS_CC);
+ 
+ 	if (connection->connection_resource && connection->connection_resource->is_connected) {
+ 		if (php_amqp_set_resource_read_timeout(connection->connection_resource, read_timeout TSRMLS_CC) == 0) {
+@@ -1078,7 +1078,7 @@ static PHP_METHOD(amqp_connection_class, setWriteTimeout)
+ 	/* Get the connection object out of the store */
+ 	connection = PHP_AMQP_GET_CONNECTION(getThis());
+ 
+-	zend_update_property_double(this_ce, getThis(), ZEND_STRL("write_timeout"), write_timeout TSRMLS_CC);
++	zend_update_property_double(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("write_timeout"), write_timeout TSRMLS_CC);
+ 
+ 	if (connection->connection_resource && connection->connection_resource->is_connected) {
+ 		if (php_amqp_set_resource_write_timeout(connection->connection_resource, write_timeout TSRMLS_CC) == 0) {
+@@ -1124,7 +1124,7 @@ static PHP_METHOD(amqp_connection_class, setRpcTimeout)
+ 	/* Get the connection object out of the store */
+ 	connection = PHP_AMQP_GET_CONNECTION(getThis());
+ 
+-	zend_update_property_double(this_ce, getThis(), ZEND_STRL("rpc_timeout"), rpc_timeout TSRMLS_CC);
++	zend_update_property_double(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("rpc_timeout"), rpc_timeout TSRMLS_CC);
+ 
+ 	if (connection->connection_resource && connection->connection_resource->is_connected) {
+ 		if (php_amqp_set_resource_rpc_timeout(connection->connection_resource, rpc_timeout TSRMLS_CC) == 0) {
+@@ -1255,7 +1255,7 @@ static PHP_METHOD(amqp_connection_class, setCACert)
+ 		return;
+ 	}
+ 
+-	zend_update_property_stringl(this_ce, getThis(), ZEND_STRL("cacert"), str, str_len TSRMLS_CC);
++	zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("cacert"), str, str_len TSRMLS_CC);
+ 
+ 	RETURN_TRUE;
+ }
+@@ -1279,7 +1279,7 @@ static PHP_METHOD(amqp_connection_class, setCert)
+ 		return;
+ 	}
+ 
+-	zend_update_property_stringl(this_ce, getThis(), ZEND_STRL("cert"), str, str_len TSRMLS_CC);
++	zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("cert"), str, str_len TSRMLS_CC);
+ 
+ 	RETURN_TRUE;
+ }
+@@ -1303,7 +1303,7 @@ static PHP_METHOD(amqp_connection_class, setKey)
+ 		return;
+ 	}
+ 
+-	zend_update_property_stringl(this_ce, getThis(), ZEND_STRL("key"), str, str_len TSRMLS_CC);
++	zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("key"), str, str_len TSRMLS_CC);
+ 
+ 	RETURN_TRUE;
+ }
+@@ -1328,7 +1328,7 @@ static PHP_METHOD(amqp_connection_class, setVerify)
+ 		return;
+ 	}
+ 
+-	zend_update_property_bool(this_ce, getThis(), ZEND_STRL("verify"), verify TSRMLS_CC);
++	zend_update_property_bool(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("verify"), verify TSRMLS_CC);
+ 
+ 	RETURN_TRUE;
+ }
+@@ -1361,7 +1361,7 @@ static PHP_METHOD(amqp_connection_class, setSaslMethod)
+ 		return;
+ 	}
+ 
+-	zend_update_property_long(this_ce, getThis(), ZEND_STRL("sasl_method"), method TSRMLS_CC);
++	zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("sasl_method"), method TSRMLS_CC);
+ 
+ 	RETURN_TRUE;
+ }
+@@ -1385,9 +1385,9 @@ static PHP_METHOD(amqp_connection_class, setConnectionName)
+ 		return;
+ 	}
+ 	if (str == NULL) {
+-		zend_update_property_null(this_ce, getThis(), ZEND_STRL("connection_name") TSRMLS_CC);
++		zend_update_property_null(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("connection_name") TSRMLS_CC);
+ 	} else {
+-		zend_update_property_stringl(this_ce, getThis(), ZEND_STRL("connection_name"), str, str_len TSRMLS_CC);
++		zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("connection_name"), str, str_len TSRMLS_CC);
+ 	}
+ 
+ 
+diff --git a/amqp_connection_resource.c b/amqp_connection_resource.c
+index 7e20a5c..b0e065a 100644
+--- a/amqp_connection_resource.c
++++ b/amqp_connection_resource.c
+@@ -112,15 +112,15 @@ static void php_amqp_close_connection_from_server(amqp_rpc_reply_t reply, char *
+ 
+ 	if (!reply.reply.id) {
+ 		PHP_AMQP_G(error_code) = -1;
+-		spprintf(message, 0, "Server connection error: %d, message: %s",
+-				 PHP_AMQP_G(error_code),
++		spprintf(message, 0, "Server connection error: %ld, message: %s",
++				 (long)PHP_AMQP_G(error_code),
+ 				 "unexpected response"
+ 		);
+ 	} else {
+ 		PHP_AMQP_G(error_code) = m->reply_code;
+ 		spprintf(message, 0, "Server connection error: %d, message: %.*s",
+ 				 m->reply_code,
+-				 (PHP5to7_param_str_len_type_t) m->reply_text.len,
++				 (int) m->reply_text.len,
+ 				 (char *) m->reply_text.bytes
+ 		);
+ 	}
+@@ -156,15 +156,15 @@ static void php_amqp_close_channel_from_server(amqp_rpc_reply_t reply, char **me
+ 
+ 	if (!reply.reply.id) {
+ 		PHP_AMQP_G(error_code) = -1;
+-		spprintf(message, 0, "Server channel error: %d, message: %s",
+-				 PHP_AMQP_G(error_code),
++		spprintf(message, 0, "Server channel error: %ld, message: %s",
++				 (long)PHP_AMQP_G(error_code),
+ 				 "unexpected response"
+ 		);
+ 	} else {
+ 		PHP_AMQP_G(error_code) = m->reply_code;
+ 		spprintf(message, 0, "Server channel error: %d, message: %.*s",
+ 			m->reply_code,
+-			(PHP5to7_param_str_len_type_t) m->reply_text.len,
++			(int) m->reply_text.len,
+ 			(char *)m->reply_text.bytes
+ 		);
+ 	}
+diff --git a/amqp_decimal.c b/amqp_decimal.c
+index 83c9f20..8fd92c1 100644
+--- a/amqp_decimal.c
++++ b/amqp_decimal.c
+@@ -53,7 +53,7 @@ static PHP_METHOD(amqp_decimal_class, __construct)
+ 	}
+ 
+ 	if (exponent > AMQP_DECIMAL_EXPONENT_MAX) {
+-		zend_throw_exception_ex(amqp_value_exception_class_entry, 0 TSRMLS_CC, "Decimal exponent value must be less than %u.", AMQP_DECIMAL_EXPONENT_MAX);
++		zend_throw_exception_ex(amqp_value_exception_class_entry, 0 TSRMLS_CC, "Decimal exponent value must be less than %u.", (unsigned)AMQP_DECIMAL_EXPONENT_MAX);
+ 		return;
+ 	}
+     if (significand < AMQP_DECIMAL_SIGNIFICAND_MIN) {
+@@ -62,12 +62,12 @@ static PHP_METHOD(amqp_decimal_class, __construct)
+     }
+ 
+     if (significand > AMQP_DECIMAL_SIGNIFICAND_MAX) {
+-        zend_throw_exception_ex(amqp_value_exception_class_entry, 0 TSRMLS_CC, "Decimal significand value must be less than %u.", AMQP_DECIMAL_SIGNIFICAND_MAX);
++        zend_throw_exception_ex(amqp_value_exception_class_entry, 0 TSRMLS_CC, "Decimal significand value must be less than %u.", (unsigned)AMQP_DECIMAL_SIGNIFICAND_MAX);
+         return;
+     }
+ 
+-    zend_update_property_long(this_ce, getThis(), ZEND_STRL("exponent"), exponent TSRMLS_CC);
+-    zend_update_property_long(this_ce, getThis(), ZEND_STRL("significand"), significand TSRMLS_CC);
++    zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("exponent"), exponent TSRMLS_CC);
++    zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("significand"), significand TSRMLS_CC);
+ }
+ /* }}} */
+ 
+diff --git a/amqp_envelope.c b/amqp_envelope.c
+index 8127bed..b7a7a45 100644
+--- a/amqp_envelope.c
++++ b/amqp_envelope.c
+@@ -67,13 +67,13 @@ void convert_amqp_envelope_to_zval(amqp_envelope_t *amqp_envelope, zval *envelop
+     amqp_basic_properties_t *p = &amqp_envelope->message.properties;
+     amqp_message_t *message = &amqp_envelope->message;
+ 
+-    zend_update_property_stringl(this_ce, envelope, ZEND_STRL("body"), (const char *) message->body.bytes, (PHP5to7_param_str_len_type_t) message->body.len TSRMLS_CC);
++    zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(envelope), ZEND_STRL("body"), (const char *) message->body.bytes, (PHP5to7_param_str_len_type_t) message->body.len TSRMLS_CC);
+ 
+-    zend_update_property_stringl(this_ce, envelope, ZEND_STRL("consumer_tag"), (const char *) amqp_envelope->consumer_tag.bytes, (PHP5to7_param_str_len_type_t) amqp_envelope->consumer_tag.len TSRMLS_CC);
+-    zend_update_property_long(this_ce, envelope, ZEND_STRL("delivery_tag"), (PHP5to7_param_long_type_t) amqp_envelope->delivery_tag TSRMLS_CC);
+-    zend_update_property_bool(this_ce, envelope, ZEND_STRL("is_redelivery"), (PHP5to7_param_long_type_t) amqp_envelope->redelivered TSRMLS_CC);
+-    zend_update_property_stringl(this_ce, envelope, ZEND_STRL("exchange_name"), (const char *) amqp_envelope->exchange.bytes, (PHP5to7_param_str_len_type_t) amqp_envelope->exchange.len TSRMLS_CC);
+-    zend_update_property_stringl(this_ce, envelope, ZEND_STRL("routing_key"), (const char *) amqp_envelope->routing_key.bytes, (PHP5to7_param_str_len_type_t) amqp_envelope->routing_key.len TSRMLS_CC);
++    zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(envelope), ZEND_STRL("consumer_tag"), (const char *) amqp_envelope->consumer_tag.bytes, (PHP5to7_param_str_len_type_t) amqp_envelope->consumer_tag.len TSRMLS_CC);
++    zend_update_property_long(this_ce, PHP5to8_OBJ_PROP(envelope), ZEND_STRL("delivery_tag"), (PHP5to7_param_long_type_t) amqp_envelope->delivery_tag TSRMLS_CC);
++    zend_update_property_bool(this_ce, PHP5to8_OBJ_PROP(envelope), ZEND_STRL("is_redelivery"), (PHP5to7_param_long_type_t) amqp_envelope->redelivered TSRMLS_CC);
++    zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(envelope), ZEND_STRL("exchange_name"), (const char *) amqp_envelope->exchange.bytes, (PHP5to7_param_str_len_type_t) amqp_envelope->exchange.len TSRMLS_CC);
++    zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(envelope), ZEND_STRL("routing_key"), (const char *) amqp_envelope->routing_key.bytes, (PHP5to7_param_str_len_type_t) amqp_envelope->routing_key.len TSRMLS_CC);
+ 
+     php_amqp_basic_properties_extract(p, envelope TSRMLS_CC);
+ }
+diff --git a/amqp_exchange.c b/amqp_exchange.c
+index 4f80d3b..4bfe397 100644
+--- a/amqp_exchange.c
++++ b/amqp_exchange.c
+@@ -65,20 +65,20 @@ static PHP_METHOD(amqp_exchange_class, __construct)
+ 	zval *channelObj;
+ 	amqp_channel_resource *channel_resource;
+ 
+-	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", &channelObj) == FAILURE) {
++	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &channelObj, amqp_channel_class_entry) == FAILURE) {
+ 		return;
+ 	}
+ 
+ 	PHP5to7_MAYBE_INIT(arguments);
+ 	PHP5to7_ARRAY_INIT(arguments);
+-	zend_update_property(this_ce, getThis(), ZEND_STRL("arguments"), PHP5to7_MAYBE_PTR(arguments) TSRMLS_CC);
++	zend_update_property(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("arguments"), PHP5to7_MAYBE_PTR(arguments) TSRMLS_CC);
+ 	PHP5to7_MAYBE_DESTROY(arguments);
+ 
+ 	channel_resource = PHP_AMQP_GET_CHANNEL_RESOURCE(channelObj);
+ 	PHP_AMQP_VERIFY_CHANNEL_RESOURCE(channel_resource, "Could not create exchange.");
+ 
+-	zend_update_property(this_ce, getThis(), ZEND_STRL("channel"), channelObj TSRMLS_CC);
+-	zend_update_property(this_ce, getThis(), ZEND_STRL("connection"), PHP_AMQP_READ_OBJ_PROP(amqp_channel_class_entry, channelObj, "connection") TSRMLS_CC);
++	zend_update_property(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("channel"), channelObj TSRMLS_CC);
++	zend_update_property(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("connection"), PHP_AMQP_READ_OBJ_PROP(amqp_channel_class_entry, channelObj, "connection") TSRMLS_CC);
+ }
+ /* }}} */
+ 
+@@ -119,7 +119,7 @@ static PHP_METHOD(amqp_exchange_class, setName)
+ 	}
+ 
+ 	/* Set the exchange name */
+-	zend_update_property_stringl(this_ce, getThis(), ZEND_STRL("name"), name, name_len TSRMLS_CC);
++	zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("name"), name, name_len TSRMLS_CC);
+ }
+ /* }}} */
+ 
+@@ -168,10 +168,10 @@ static PHP_METHOD(amqp_exchange_class, setFlags)
+ 	/* Set the flags based on the bitmask we were given */
+ 	flagBitmask = flagBitmask ? flagBitmask & PHP_AMQP_EXCHANGE_FLAGS : flagBitmask;
+ 
+-	zend_update_property_bool(this_ce, getThis(), ZEND_STRL("passive"), IS_PASSIVE(flagBitmask) TSRMLS_CC);
+-	zend_update_property_bool(this_ce, getThis(), ZEND_STRL("durable"), IS_DURABLE(flagBitmask) TSRMLS_CC);
+-	zend_update_property_bool(this_ce, getThis(), ZEND_STRL("auto_delete"), IS_AUTODELETE(flagBitmask) TSRMLS_CC);
+-	zend_update_property_bool(this_ce, getThis(), ZEND_STRL("internal"), IS_INTERNAL(flagBitmask) TSRMLS_CC);
++	zend_update_property_bool(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("passive"), IS_PASSIVE(flagBitmask) TSRMLS_CC);
++	zend_update_property_bool(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("durable"), IS_DURABLE(flagBitmask) TSRMLS_CC);
++	zend_update_property_bool(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("auto_delete"), IS_AUTODELETE(flagBitmask) TSRMLS_CC);
++	zend_update_property_bool(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("internal"), IS_INTERNAL(flagBitmask) TSRMLS_CC);
+ }
+ /* }}} */
+ 
+@@ -204,7 +204,7 @@ static PHP_METHOD(amqp_exchange_class, setType)
+ 		return;
+ 	}
+ 
+-	zend_update_property_stringl(this_ce, getThis(), ZEND_STRL("type"), type, type_len TSRMLS_CC);
++	zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("type"), type, type_len TSRMLS_CC);
+ }
+ /* }}} */
+ 
+@@ -273,7 +273,7 @@ static PHP_METHOD(amqp_exchange_class, setArguments)
+ 		return;
+ 	}
+ 
+-	zend_update_property(this_ce, getThis(), ZEND_STRL("arguments"), zvalArguments TSRMLS_CC);
++	zend_update_property(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("arguments"), zvalArguments TSRMLS_CC);
+ 
+ 	RETURN_TRUE;
+ }
+diff --git a/amqp_queue.c b/amqp_queue.c
+index c13629c..eeba144 100644
+--- a/amqp_queue.c
++++ b/amqp_queue.c
+@@ -68,20 +68,20 @@ static PHP_METHOD(amqp_queue_class, __construct)
+ 	zval *channelObj;
+ 	amqp_channel_resource *channel_resource;
+ 
+-	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", &channelObj) == FAILURE) {
++	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &channelObj, amqp_channel_class_entry) == FAILURE) {
+ 		return;
+ 	}
+ 
+ 	PHP5to7_MAYBE_INIT(arguments);
+ 	PHP5to7_ARRAY_INIT(arguments);
+-	zend_update_property(this_ce, getThis(), ZEND_STRL("arguments"), PHP5to7_MAYBE_PTR(arguments) TSRMLS_CC);
++	zend_update_property(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("arguments"), PHP5to7_MAYBE_PTR(arguments) TSRMLS_CC);
+ 	PHP5to7_MAYBE_DESTROY(arguments);
+ 
+ 	channel_resource = PHP_AMQP_GET_CHANNEL_RESOURCE(channelObj);
+ 	PHP_AMQP_VERIFY_CHANNEL_RESOURCE(channel_resource, "Could not create queue.");
+ 
+-	zend_update_property(this_ce, getThis(), ZEND_STRL("channel"), channelObj TSRMLS_CC);
+-	zend_update_property(this_ce, getThis(), ZEND_STRL("connection"), PHP_AMQP_READ_OBJ_PROP(amqp_channel_class_entry, channelObj, "connection") TSRMLS_CC);
++	zend_update_property(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("channel"), channelObj TSRMLS_CC);
++	zend_update_property(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("connection"), PHP_AMQP_READ_OBJ_PROP(amqp_channel_class_entry, channelObj, "connection") TSRMLS_CC);
+ 
+ }
+ /* }}} */
+@@ -122,7 +122,7 @@ static PHP_METHOD(amqp_queue_class, setName)
+ 	}
+ 
+ 	/* Set the queue name */
+-	zend_update_property_stringl(this_ce, getThis(), ZEND_STRL("name"), name, name_len TSRMLS_CC);
++	zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("name"), name, name_len TSRMLS_CC);
+ 
+ 	/* BC */
+ 	RETURN_TRUE;
+@@ -175,10 +175,10 @@ static PHP_METHOD(amqp_queue_class, setFlags)
+ 	/* Set the flags based on the bitmask we were given */
+ 	flagBitmask = flagBitmask ? flagBitmask & PHP_AMQP_QUEUE_FLAGS : flagBitmask;
+ 
+-	zend_update_property_bool(this_ce, getThis(), ZEND_STRL("passive"), IS_PASSIVE(flagBitmask) TSRMLS_CC);
+-	zend_update_property_bool(this_ce, getThis(), ZEND_STRL("durable"), IS_DURABLE(flagBitmask) TSRMLS_CC);
+-	zend_update_property_bool(this_ce, getThis(), ZEND_STRL("exclusive"), IS_EXCLUSIVE(flagBitmask) TSRMLS_CC);
+-	zend_update_property_bool(this_ce, getThis(), ZEND_STRL("auto_delete"), IS_AUTODELETE(flagBitmask) TSRMLS_CC);
++	zend_update_property_bool(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("passive"), IS_PASSIVE(flagBitmask) TSRMLS_CC);
++	zend_update_property_bool(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("durable"), IS_DURABLE(flagBitmask) TSRMLS_CC);
++	zend_update_property_bool(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("exclusive"), IS_EXCLUSIVE(flagBitmask) TSRMLS_CC);
++	zend_update_property_bool(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("auto_delete"), IS_AUTODELETE(flagBitmask) TSRMLS_CC);
+ 
+ 	/* BC */
+ 	RETURN_TRUE;
+@@ -250,7 +250,7 @@ static PHP_METHOD(amqp_queue_class, setArguments)
+ 		return;
+ 	}
+ 
+-	zend_update_property(this_ce, getThis(), ZEND_STRL("arguments"), zvalArguments TSRMLS_CC);
++	zend_update_property(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("arguments"), zvalArguments TSRMLS_CC);
+ 
+ 	RETURN_TRUE;
+ }
+@@ -342,7 +342,7 @@ static PHP_METHOD(amqp_queue_class, declareQueue)
+ 
+ 	/* Set the queue name, in case it is an autogenerated queue name */
+ 	name = php_amqp_type_amqp_bytes_to_char(r->queue);
+-	zend_update_property_string(this_ce, getThis(), ZEND_STRL("name"), name TSRMLS_CC);
++	zend_update_property_string(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("name"), name TSRMLS_CC);
+ 	efree(name);
+ 
+ 	php_amqp_maybe_release_buffers_on_channel(channel_resource->connection_resource, channel_resource);
+@@ -525,7 +525,7 @@ static PHP_METHOD(amqp_queue_class, consume)
+ 	}
+ 
+ 	zval *channel_zv = PHP_AMQP_READ_THIS_PROP("channel");
+-	zval *consumers = zend_read_property(amqp_channel_class_entry, channel_zv, ZEND_STRL("consumers"), 0 PHP5to7_READ_PROP_RV_PARAM_CC TSRMLS_CC);
++	zval *consumers = zend_read_property(amqp_channel_class_entry, PHP5to8_OBJ_PROP(channel_zv), ZEND_STRL("consumers"), 0 PHP5to7_READ_PROP_RV_PARAM_CC TSRMLS_CC);
+ 
+ 	if (IS_ARRAY != Z_TYPE_P(consumers)) {
+ 		zend_throw_exception(amqp_queue_exception_class_entry, "Invalid channel consumers, forgot to call channel constructor?", 0 TSRMLS_CC);
+@@ -594,7 +594,7 @@ static PHP_METHOD(amqp_queue_class, consume)
+ 		efree(key);
+ 
+ 		/* Set the consumer tag name, in case it is an autogenerated consumer tag name */
+-		zend_update_property_stringl(this_ce, getThis(), ZEND_STRL("consumer_tag"), (const char *) r->consumer_tag.bytes, (PHP5to7_param_str_len_type_t) r->consumer_tag.len TSRMLS_CC);
++		zend_update_property_stringl(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("consumer_tag"), (const char *) r->consumer_tag.bytes, (PHP5to7_param_str_len_type_t) r->consumer_tag.len TSRMLS_CC);
+ 	}
+ 
+ 	if (!ZEND_FCI_INITIALIZED(fci)) {
+@@ -674,7 +674,7 @@ static PHP_METHOD(amqp_queue_class, consume)
+ 		current_channel_zv = current_channel_resource->parent->this_ptr;
+ #endif
+ 
+-		consumers = zend_read_property(amqp_channel_class_entry, PHP5to7_MAYBE_PTR(current_channel_zv), ZEND_STRL("consumers"), 0 PHP5to7_READ_PROP_RV_PARAM_CC TSRMLS_CC);
++		consumers = zend_read_property(amqp_channel_class_entry, PHP5to8_OBJ_PROP(PHP5to7_MAYBE_PTR(current_channel_zv)), ZEND_STRL("consumers"), 0 PHP5to7_READ_PROP_RV_PARAM_CC TSRMLS_CC);
+ 
+ 		if (IS_ARRAY != Z_TYPE_P(consumers)) {
+ 			zend_throw_exception(amqp_queue_exception_class_entry, "Invalid channel consumers, forgot to call channel constructor?", 0 TSRMLS_CC);
+@@ -689,8 +689,8 @@ static PHP_METHOD(amqp_queue_class, consume)
+ 			PHP5to7_zval_t exception PHP5to7_MAYBE_SET_TO_NULL;
+ 			PHP5to7_MAYBE_INIT(exception);
+ 			object_init_ex(PHP5to7_MAYBE_PTR(exception), amqp_envelope_exception_class_entry);
+-		    zend_update_property_string(zend_exception_get_default(TSRMLS_C), PHP5to7_MAYBE_PTR(exception),  ZEND_STRL("message"), "Orphaned envelope" TSRMLS_CC);
+-			zend_update_property(amqp_envelope_exception_class_entry, PHP5to7_MAYBE_PTR(exception), ZEND_STRL("envelope"), PHP5to7_MAYBE_PTR(message) TSRMLS_CC);
++		    zend_update_property_string(zend_exception_get_default(TSRMLS_C), PHP5to8_OBJ_PROP(PHP5to7_MAYBE_PTR(exception)),  ZEND_STRL("message"), "Orphaned envelope" TSRMLS_CC);
++			zend_update_property(amqp_envelope_exception_class_entry, PHP5to8_OBJ_PROP(PHP5to7_MAYBE_PTR(exception)), ZEND_STRL("envelope"), PHP5to7_MAYBE_PTR(message) TSRMLS_CC);
+ 
+ 			zend_throw_exception_object(PHP5to7_MAYBE_PTR(exception) TSRMLS_CC);
+ 
+@@ -946,7 +946,7 @@ static PHP_METHOD(amqp_queue_class, cancel)
+ 	}
+ 
+ 	zval *channel_zv = PHP_AMQP_READ_THIS_PROP("channel");
+-	zval *consumers = zend_read_property(amqp_channel_class_entry, channel_zv, ZEND_STRL("consumers"), 0 PHP5to7_READ_PROP_RV_PARAM_CC TSRMLS_CC);
++	zval *consumers = zend_read_property(amqp_channel_class_entry, PHP5to8_OBJ_PROP(channel_zv), ZEND_STRL("consumers"), 0 PHP5to7_READ_PROP_RV_PARAM_CC TSRMLS_CC);
+ 	zend_bool has_consumer_tag = (zend_bool) (IS_STRING == Z_TYPE_P(PHP_AMQP_READ_THIS_PROP("consumer_tag")));
+ 
+ 	if (IS_ARRAY != Z_TYPE_P(consumers)) {
+@@ -977,8 +977,8 @@ static PHP_METHOD(amqp_queue_class, cancel)
+ 		return;
+ 	}
+ 
+-	if (!consumer_tag_len || has_consumer_tag && strcmp(consumer_tag, PHP_AMQP_READ_THIS_PROP_STR("consumer_tag")) != 0) {
+-		zend_update_property_null(this_ce, getThis(), ZEND_STRL("consumer_tag") TSRMLS_CC);
++	if (!consumer_tag_len || (has_consumer_tag && strcmp(consumer_tag, PHP_AMQP_READ_THIS_PROP_STR("consumer_tag")) != 0)) {
++		zend_update_property_null(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("consumer_tag") TSRMLS_CC);
+ 	}
+ 
+     char *key;
+diff --git a/amqp_timestamp.c b/amqp_timestamp.c
+index d9eec39..ed07ab6 100644
+--- a/amqp_timestamp.c
++++ b/amqp_timestamp.c
+@@ -61,7 +61,7 @@ static PHP_METHOD(amqp_timestamp_class, __construct)
+ 	#if PHP_MAJOR_VERSION >= 7
+ 		zend_string *str;
+ 		str = _php_math_number_format_ex(timestamp, 0, "", 0, "", 0);
+-		zend_update_property_str(this_ce, getThis(), ZEND_STRL("timestamp"), str);
++		zend_update_property_str(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL("timestamp"), str);
+         zend_string_delref(str);
+ 	#else
+ 		char *str;
+@@ -104,7 +104,11 @@ ZEND_END_ARG_INFO()
+ ZEND_BEGIN_ARG_INFO_EX(arginfo_amqp_timestamp_class_getTimestamp, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 0)
+ ZEND_END_ARG_INFO()
+ 
++#if PHP_MAJOR_VERSION < 8
+ ZEND_BEGIN_ARG_INFO_EX(arginfo_amqp_timestamp_class_toString, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, 0)
++#else
++ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_amqp_timestamp_class_toString, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, IS_STRING, 0)
++#endif
+ ZEND_END_ARG_INFO()
+ 
+ zend_function_entry amqp_timestamp_class_functions[] = {
+diff --git a/amqp_type.c b/amqp_type.c
+index fb87727..5f1ab91 100644
+--- a/amqp_type.c
++++ b/amqp_type.c
+@@ -250,7 +250,7 @@ zend_bool php_amqp_type_internal_convert_php_to_amqp_field_value(zval *value, am
+ 			if (instanceof_function(Z_OBJCE_P(value), amqp_timestamp_class_entry TSRMLS_CC)) {
+                 PHP5to7_zval_t result_zv PHP5to7_MAYBE_SET_TO_NULL;
+ 
+-                zend_call_method_with_0_params(PHP5to7_MAYBE_PARAM_PTR(value), amqp_timestamp_class_entry, NULL, "gettimestamp", &result_zv);
++                zend_call_method_with_0_params(PHP5to8_OBJ_PROP(PHP5to7_MAYBE_PARAM_PTR(value)), amqp_timestamp_class_entry, NULL, "gettimestamp", &result_zv);
+ 
+                 field->kind = AMQP_FIELD_KIND_TIMESTAMP;
+                 field->value.u64 = strtoimax(Z_STRVAL(PHP5to7_MAYBE_DEREF(result_zv)), NULL, 10);
+@@ -262,11 +262,11 @@ zend_bool php_amqp_type_internal_convert_php_to_amqp_field_value(zval *value, am
+ 				field->kind = AMQP_FIELD_KIND_DECIMAL;
+ 				PHP5to7_zval_t result_zv PHP5to7_MAYBE_SET_TO_NULL;
+ 
+-				zend_call_method_with_0_params(PHP5to7_MAYBE_PARAM_PTR(value), amqp_decimal_class_entry, NULL, "getexponent", &result_zv);
++				zend_call_method_with_0_params(PHP5to8_OBJ_PROP(PHP5to7_MAYBE_PARAM_PTR(value)), amqp_decimal_class_entry, NULL, "getexponent", &result_zv);
+ 				field->value.decimal.decimals = (uint8_t)Z_LVAL(PHP5to7_MAYBE_DEREF(result_zv));
+ 				PHP5to7_MAYBE_DESTROY(result_zv);
+ 
+-				zend_call_method_with_0_params(PHP5to7_MAYBE_PARAM_PTR(value), amqp_decimal_class_entry, NULL, "getsignificand", &result_zv);
++				zend_call_method_with_0_params(PHP5to8_OBJ_PROP(PHP5to7_MAYBE_PARAM_PTR(value)), amqp_decimal_class_entry, NULL, "getsignificand", &result_zv);
+ 				field->value.decimal.value = (uint32_t)Z_LVAL(PHP5to7_MAYBE_DEREF(result_zv));
+ 
+ 				PHP5to7_MAYBE_DESTROY(result_zv);
+diff --git a/php5_support.h b/php5_support.h
+index 5c57620..25c2d96 100644
+--- a/php5_support.h
++++ b/php5_support.h
+@@ -109,6 +109,8 @@ typedef zend_rsrc_list_entry PHP5to7_zend_resource_le_t;
+ #define ZEND_ULONG_FMT "%" PRIu64
+ #define PHP5to7_ZEND_ACC_FINAL_CLASS ZEND_ACC_FINAL_CLASS
+ 
++#define PHP5to8_OBJ_PROP(zv) (zv)
++
+ #endif //PHP_AMQP_PHP5_SUPPORT_H
+ 
+ /*
+diff --git a/php7_support.h b/php7_support.h
+index c9e8f5b..0dbd6b2 100644
+--- a/php7_support.h
++++ b/php7_support.h
+@@ -101,15 +101,24 @@ typedef zval PHP5to7_zend_resource_le_t;
+ 
+ #define PHP5to7_ZEND_ACC_FINAL_CLASS ZEND_ACC_FINAL
+ 
++
+ /* Small change to let it build after a major internal change for php8.0
+  * More info:
+  * https://github.com/php/php-src/blob/php-8.0.0alpha3/UPGRADING.INTERNALS#L47
+  */
+ #if PHP_MAJOR_VERSION >= 8
++
+ # define TSRMLS_DC
+ # define TSRMLS_D
+ # define TSRMLS_CC
+ # define TSRMLS_C
++
++#define PHP5to8_OBJ_PROP(zv) Z_OBJ_P(zv)
++
++#else
++
++#define PHP5to8_OBJ_PROP(zv) (zv)
++
+ # endif
+ 
+ #endif //PHP_AMQP_PHP7_SUPPORT_H
+diff --git a/php_amqp.h b/php_amqp.h
+index 752edd7..686741d 100644
+--- a/php_amqp.h
++++ b/php_amqp.h
+@@ -221,14 +221,14 @@ struct _amqp_connection_object {
+ #define PHP_AMQP_NOPARAMS() if (zend_parse_parameters_none() == FAILURE) { return; }
+ 
+ #define PHP_AMQP_RETURN_THIS_PROP(prop_name) \
+-    zval * _zv = zend_read_property(this_ce, getThis(), ZEND_STRL(prop_name), 0 PHP5to7_READ_PROP_RV_PARAM_CC TSRMLS_CC); \
++    zval * _zv = zend_read_property(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL(prop_name), 0 PHP5to7_READ_PROP_RV_PARAM_CC TSRMLS_CC); \
+     RETURN_ZVAL(_zv, 1, 0);
+ 
+-#define PHP_AMQP_READ_OBJ_PROP(cls, obj, name) zend_read_property((cls), (obj), ZEND_STRL(name), 0 PHP5to7_READ_PROP_RV_PARAM_CC TSRMLS_CC)
++#define PHP_AMQP_READ_OBJ_PROP(cls, obj, name) zend_read_property((cls), PHP5to8_OBJ_PROP(obj), ZEND_STRL(name), 0 PHP5to7_READ_PROP_RV_PARAM_CC TSRMLS_CC)
+ #define PHP_AMQP_READ_OBJ_PROP_DOUBLE(cls, obj, name) Z_DVAL_P(PHP_AMQP_READ_OBJ_PROP((cls), (obj), (name)))
+ 
+-#define PHP_AMQP_READ_THIS_PROP_CE(name, ce) zend_read_property((ce), getThis(), ZEND_STRL(name), 0 PHP5to7_READ_PROP_RV_PARAM_CC TSRMLS_CC)
+-#define PHP_AMQP_READ_THIS_PROP(name) zend_read_property(this_ce, getThis(), ZEND_STRL(name), 0 PHP5to7_READ_PROP_RV_PARAM_CC TSRMLS_CC)
++#define PHP_AMQP_READ_THIS_PROP_CE(name, ce) zend_read_property((ce), PHP5to8_OBJ_PROP(getThis()), ZEND_STRL(name), 0 PHP5to7_READ_PROP_RV_PARAM_CC TSRMLS_CC)
++#define PHP_AMQP_READ_THIS_PROP(name) zend_read_property(this_ce, PHP5to8_OBJ_PROP(getThis()), ZEND_STRL(name), 0 PHP5to7_READ_PROP_RV_PARAM_CC TSRMLS_CC)
+ #define PHP_AMQP_READ_THIS_PROP_BOOL(name) Z_BVAL_P(PHP_AMQP_READ_THIS_PROP(name))
+ #define PHP_AMQP_READ_THIS_PROP_STR(name) Z_STRVAL_P(PHP_AMQP_READ_THIS_PROP(name))
+ #define PHP_AMQP_READ_THIS_PROP_STRLEN(name) (Z_TYPE_P(PHP_AMQP_READ_THIS_PROP(name)) == IS_STRING ? Z_STRLEN_P(PHP_AMQP_READ_THIS_PROP(name)) : 0)
+diff --git a/tests/amqptimestamp.phpt b/tests/amqptimestamp.phpt
+index 9835883..6424f8b 100644
+--- a/tests/amqptimestamp.phpt
++++ b/tests/amqptimestamp.phpt
+@@ -2,7 +2,7 @@
+ AMQPTimestamp
+ --SKIPIF--
+ <?php
+-if (!extension_loaded("amqp") || version_compare(PHP_VERSION, '5.3', '<')) {
++if (!extension_loaded("amqp") || version_compare(PHP_VERSION, '5.3', '<') || version_compare(PHP_VERSION, '8.0', '>')) {
+   print "skip";
+ }
+ --FILE--
+@@ -52,4 +52,4 @@ bool(true)
+ string(20) "18446744073709551616"
+ string(1) "0"
+ 
+-==END==
+\ No newline at end of file
++==END==
+diff --git a/tests/amqptimestamp_php8.phpt b/tests/amqptimestamp_php8.phpt
+new file mode 100644
+index 0000000..dabecc5
+--- /dev/null
++++ b/tests/amqptimestamp_php8.phpt
+@@ -0,0 +1,60 @@
++--TEST--
++AMQPTimestamp
++--SKIPIF--
++<?php
++if (!extension_loaded("amqp") || version_compare(PHP_VERSION, '8.0', '<')) {
++  print "skip";
++}
++--FILE--
++<?php
++
++$timestamp = new AMQPTimestamp(100000);
++var_dump($timestamp->getTimestamp(), (string) $timestamp);
++
++$timestamp = new AMQPTimestamp(100000.1);
++var_dump($timestamp->getTimestamp(), (string) $timestamp);
++
++try {
++	new AMQPTimestamp();
++} catch(ArgumentCountError $e) {
++	echo $e->getMessage() . "\n";
++}
++try {
++	new AMQPTimestamp("string");
++} catch(TypeError $e) {
++	echo $e->getMessage() . "\n";
++}
++
++try {
++    new AMQPTimestamp(AMQPTimestamp::MIN - 1);
++} catch (AMQPValueException $e) {
++    echo $e->getMessage() . "\n";
++}
++
++try {
++    new AMQPTimestamp(INF);
++} catch (AMQPValueException $e) {
++    echo $e->getMessage() . "\n";
++}
++
++var_dump((new ReflectionClass("AMQPTimestamp"))->isFinal());
++
++var_dump(AMQPTimestamp::MAX);
++var_dump(AMQPTimestamp::MIN);
++?>
++
++==END==
++--EXPECTF--
++string(6) "100000"
++string(6) "100000"
++string(6) "100000"
++string(6) "100000"
++AMQPTimestamp::__construct() expects exactly 1 parameter, 0 given
++AMQPTimestamp::__construct(): Argument #1 ($timestamp) must be of type float, string given
++The timestamp parameter must be greater than 0.
++The timestamp parameter must be less than 18446744073709551616.
++bool(true)
++string(20) "18446744073709551616"
++string(1) "0"
++
++==END==
+diff --git a/tests/bug_61533.phpt b/tests/bug_61533.phpt
+index ecb5213..f53c315 100644
+--- a/tests/bug_61533.phpt
++++ b/tests/bug_61533.phpt
+@@ -21,4 +21,4 @@ try {
+ 
+ ?>
+ --EXPECTF--
+-%s: Argument 1 passed to AMQPQueue::__construct() must be an instance of AMQPChannel, instance of AMQPConnection given%s
++%s AMQPChannel%s AMQPConnection%s
-- 
2.31.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 11/11] package/php: bump version to 8.0.7
  2021-06-29 16:50 [Buildroot] [PATCH 01/11] package/php-amqp: bump version to 1.10.2 Adam Duskett
                   ` (8 preceding siblings ...)
  2021-06-29 16:50 ` [Buildroot] [PATCH 10/11] package/php-amqp: add add upstream php8 compatibility patches Adam Duskett
@ 2021-06-29 16:50 ` Adam Duskett
  2021-07-03 20:03 ` [Buildroot] [PATCH 01/11] package/php-amqp: bump version to 1.10.2 Thomas Petazzoni
  10 siblings, 0 replies; 12+ messages in thread
From: Adam Duskett @ 2021-06-29 16:50 UTC (permalink / raw)
  To: buildroot

Other changes:
  - Move BR2_PACKAGE_PHP_EXT_JSON to Config.in.legacy as the json extension is
    now an integral part of PHP and is no longer optional.

  - Move BR2_PACKAGE_PHP_EXT_XMLRPC to Config.in.legacy as the extension has
    been removed. See https://wiki.php.net/rfc/unbundle_xmlprc for an
    explination.

  - Add a new patch that allows for opcache to cross-compile with PHP8.

  - Explicitly disable opcache-jit when opcache is enabled, as the JIT fails
    to cross-compile.
  
  - --enable-maintainer-zts is now --enable-zts

Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
 Config.in.legacy                              | 15 ++++++
 ...1-acinclude.m4-don-t-unset-variables.patch |  4 +-
 .../0002-iconv-tweak-iconv-detection.patch    | 48 +++----------------
 ...0003-configure-disable-the-phar-tool.patch |  6 +--
 .../0004-Call-apxs-with-correct-prefix.patch  |  8 ++--
 .../0005-allow-opcache-cross-compiling.patch  | 37 ++++++++++++++
 package/php/Config.ext                        | 12 -----
 package/php/php.hash                          |  2 +-
 package/php/php.mk                            | 16 ++-----
 9 files changed, 73 insertions(+), 75 deletions(-)
 create mode 100644 package/php/0005-allow-opcache-cross-compiling.patch

diff --git a/Config.in.legacy b/Config.in.legacy
index a0c1a6898f..2865e4c58b 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -146,6 +146,21 @@ endif
 
 comment "Legacy options removed in 2021.05"
 
+config BR2_PACKAGE_PHP_EXT_XMLRPC
+	bool "PHP XMLRPC extension removed"
+	select BR2_LEGACY
+	help
+	  The XMLRPC php extension was removed.
+	  See: https://wiki.php.net/rfc/unbundle_xmlprc
+
+config BR2_PACKAGE_PHP_EXT_JSON
+	bool "Optional PHP JSON extension removed"
+	select BR2_LEGACY
+	help
+	  The JSON extension is now an integral part of PHP and cannot
+	  be disabled as per RFC:
+	  https://wiki.php.net/rfc/always_enable_json
+
 config BR2_PACKAGE_UDISKS_LVM2
 	bool "udisks lvm2 support removed"
 	select BR2_LEGACY
diff --git a/package/php/0001-acinclude.m4-don-t-unset-variables.patch b/package/php/0001-acinclude.m4-don-t-unset-variables.patch
index 982857a357..2d15552783 100644
--- a/package/php/0001-acinclude.m4-don-t-unset-variables.patch
+++ b/package/php/0001-acinclude.m4-don-t-unset-variables.patch
@@ -17,7 +17,7 @@ diff --git a/build/php.m4 b/build/php.m4
 index e91ef988..9586c490 100644
 --- a/build/php.m4
 +++ b/build/php.m4
-@@ -1587,8 +1587,6 @@ dnl PHP_CHECK_FUNC_LIB
+@@ -1568,8 +1568,6 @@ dnl PHP_CHECK_FUNC_LIB
  dnl
  AC_DEFUN([PHP_CHECK_FUNC_LIB],[
    ifelse($2,,:,[
@@ -26,7 +26,7 @@ index e91ef988..9586c490 100644
    unset found
    AC_CHECK_LIB($2, $1, [found=yes], [
      AC_CHECK_LIB($2, __$1, [found=yes], [found=no])
-@@ -1620,8 +1618,6 @@ dnl and as a fall back in the specified library. Defines HAVE_func and
+@@ -1601,8 +1599,6 @@ dnl and as a fall back in the specified library. Defines HAVE_func and
  dnl HAVE_library if found and adds the library to LIBS.
  dnl
  AC_DEFUN([PHP_CHECK_FUNC],[
diff --git a/package/php/0002-iconv-tweak-iconv-detection.patch b/package/php/0002-iconv-tweak-iconv-detection.patch
index 65ed6055bc..19d7ab5cf9 100644
--- a/package/php/0002-iconv-tweak-iconv-detection.patch
+++ b/package/php/0002-iconv-tweak-iconv-detection.patch
@@ -14,60 +14,26 @@ Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
 [Gustavo: convert to nice m4 instead of patching configure]
 [Gustavo: update for 5.6.10]
 Signed-off-by: Adam Duskett <aduskett@gmail.com>
-[aduskett at gmail.com: Update for 7.3.0]
+[aduskett at gmail.com: Update for 8.0.7]
 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
 [Bernd: rebased for 7.4.10 & 7.4.13]
 ---
- build/php.m4        |  2 +-
- ext/iconv/config.m4 | 22 ----------------------
- 2 files changed, 1 insertion(+), 23 deletions(-)
+ build/php.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/build/php.m4 b/build/php.m4
 index 9586c490..8b3d47ed 100644
 --- a/build/php.m4
 +++ b/build/php.m4
-@@ -1973,7 +1973,7 @@ AC_DEFUN([PHP_SETUP_ICONV], [
+@@ -1937,7 +1937,7 @@ AC_DEFUN([PHP_SETUP_ICONV], [
    dnl Check external libs for iconv funcs.
    if test "$found_iconv" = "no"; then
  
 -    for i in $PHP_ICONV /usr/local /usr; do
 +    for i in $PHP_ICONV; do
-       if test -r $i/include/giconv.h; then
-         AC_DEFINE(HAVE_GICONV_H, 1, [ ])
+       if test -r $i/include/gnu-libiconv/iconv.h; then
          ICONV_DIR=$i
-diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4
-index fe9b47aa..70599694 100644
---- a/ext/iconv/config.m4
-+++ b/ext/iconv/config.m4
-@@ -13,28 +13,6 @@ if test "$PHP_ICONV" != "no"; then
-   ])
- 
-   if test "$iconv_avail" != "no"; then
--    if test -z "$ICONV_DIR"; then
--      for i in /usr/local /usr; do
--        if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then
--          PHP_ICONV_PREFIX="$i"
--          break
--        fi
--      done
--      if test -z "$PHP_ICONV_PREFIX"; then
--        PHP_ICONV_PREFIX="/usr"
--      fi
--    else
--      PHP_ICONV_PREFIX="$ICONV_DIR"
--    fi
--
--    CFLAGS="-I$PHP_ICONV_PREFIX/include $CFLAGS"
--    LDFLAGS="-L$PHP_ICONV_PREFIX/$PHP_LIBDIR $LDFLAGS"
--
--    if test -r "$PHP_ICONV_PREFIX/include/giconv.h"; then
--      PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/giconv.h"
--    else
--      PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/iconv.h"
--	fi
- 
-     AC_MSG_CHECKING([if iconv is glibc's])
-     AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gnu/libc-version.h>]], [[gnu_get_libc_version();]])],[
+         ICONV_INCLUDE_DIR=$i/include/gnu-libiconv
 -- 
-2.7.4
+2.31.1
 
diff --git a/package/php/0003-configure-disable-the-phar-tool.patch b/package/php/0003-configure-disable-the-phar-tool.patch
index 4a25ec05c1..cc4f55a8c8 100644
--- a/package/php/0003-configure-disable-the-phar-tool.patch
+++ b/package/php/0003-configure-disable-the-phar-tool.patch
@@ -11,7 +11,7 @@ on the target.
 Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
 [Gustavo: update for autoreconf/configure.in]
 Signed-off-by: Adam Duskett <aduskett@gmail.com>
-[Aduskett: update for 7.3.0]
+[Aduskett: update for 8.0.7]
 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
 [Bernd: rebased for 7.4.10 & 7.4.13]
 ---
@@ -22,8 +22,8 @@ diff --git a/configure.ac b/configure.ac
 index 0dfab302..6026fb66 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1454,13 +1454,8 @@ CFLAGS="\$(CFLAGS_CLEAN) $standard_libtool_flag"
- INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag"
+@@ -1423,13 +1423,8 @@ CFLAGS_CLEAN="$CFLAGS \$(PROF_FLAGS)"
+ CFLAGS="\$(CFLAGS_CLEAN) $standard_libtool_flag"
  CXXFLAGS="$CXXFLAGS $standard_libtool_flag \$(PROF_FLAGS)"
  
 -if test "$PHP_PHAR" != "no" && test "$PHP_CLI" != "no"; then
diff --git a/package/php/0004-Call-apxs-with-correct-prefix.patch b/package/php/0004-Call-apxs-with-correct-prefix.patch
index a0a0715789..3a1a580084 100644
--- a/package/php/0004-Call-apxs-with-correct-prefix.patch
+++ b/package/php/0004-Call-apxs-with-correct-prefix.patch
@@ -7,7 +7,7 @@ php uses apache's apxs script from staging directory to install libphp
 dynamic library and update /etc/apache2/httpd.conf in the staging and target
 directories. Here is the full command line:
 "apxs -S LIBEXECDIR='$(INSTALL_ROOT)/usr/modules'
- -S SYSCONFDIR='$(INSTALL_ROOT)/etc/apache2' -i -a -n php7"
+ -S SYSCONFDIR='$(INSTALL_ROOT)/etc/apache2' -i -a -n php"
 This does not work for target directory as apxs sets the full path of the
 library and not the relative one. Indeed, apxs is smart enough to substitute
 away the prefix specified in $(STAGING_DIR)/usr/build/config_vars.mk so
@@ -16,7 +16,7 @@ To fix this, add -S PREFIX='$(INSTALL_ROOT)/usr' to apxs call in configure
 
 Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
 Signed-off-by: Adam Duskett <aduskett@gmail.com>
-[aduskett at gmail.com: Update for 7.3.0]
+[aduskett at gmail.com: Update for 8.0.7]
 ---
  sapi/apache2handler/config.m4 | 3 +++
  1 file changed, 3 insertions(+)
@@ -35,7 +35,7 @@ index 55c16179..68ce66c0 100644
      INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
                   $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
 +                       -S PREFIX='$APXS_PREFIX' \
-                        -i -n php7"
+                        -i -n php"
    else
      APXS_SYSCONFDIR='$(INSTALL_ROOT)'`$APXS -q SYSCONFDIR`
 @@ -74,6 +76,7 @@ if test "$PHP_APXS2" != "no"; then
@@ -43,7 +43,7 @@ index 55c16179..68ce66c0 100644
                   $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
                         -S SYSCONFDIR='$APXS_SYSCONFDIR' \
 +                       -S PREFIX='$APXS_PREFIX' \
-                        -i -a -n php7"
+                        -i -a -n php"
    fi
  
 -- 
diff --git a/package/php/0005-allow-opcache-cross-compiling.patch b/package/php/0005-allow-opcache-cross-compiling.patch
new file mode 100644
index 0000000000..d168f71892
--- /dev/null
+++ b/package/php/0005-allow-opcache-cross-compiling.patch
@@ -0,0 +1,37 @@
+From 9bb316c41a69935ee2072626467241889594bed4 Mon Sep 17 00:00:00 2001
+From: Adam Duskett <aduskett@gmail.com>
+Date: Mon, 28 Jun 2021 11:12:36 -0700
+Subject: [PATCH] allow opcache cross-compiling
+
+Remove the check at the end of ext/opcache/config.m4 that prevents opcache from
+being enabled in a cross-compiled environment. We pass the following as a
+CFLAGS when opcache is enabled:
+  -DHAVE_SHM_IPC
+  -DHAVE_SHM_MMAP_ANON
+  -DHAVE_SHM_MMAP_ZERO
+  -DHAVE_SHM_MMAP_POSIX
+  -DHAVE_SHM_MMAP_FILE
+
+Signed-off-by: Adam Duskett <aduskett@gmail.com>
+---
+ ext/opcache/config.m4 | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4
+index 5492fd92..10c150ff 100644
+--- a/ext/opcache/config.m4
++++ b/ext/opcache/config.m4
+@@ -339,10 +339,6 @@ int main() {
+   PHP_ADD_BUILD_DIR([$ext_builddir/Optimizer], 1)
+   PHP_ADD_EXTENSION_DEP(opcache, pcre)
+ 
+-  if test "$have_shm_ipc" != "yes" && test "$have_shm_mmap_posix" != "yes" && test "$have_shm_mmap_anon" != "yes"; then
+-    AC_MSG_ERROR([No supported shared memory caching support was found when configuring opcache. Check config.log for any errors or missing dependencies.])
+-  fi
+-
+   if test "$PHP_OPCACHE_JIT" = "yes"; then
+     PHP_ADD_BUILD_DIR([$ext_builddir/jit], 1)
+     PHP_ADD_MAKEFILE_FRAGMENT($ext_srcdir/jit/Makefile.frag)
+-- 
+2.31.1
+
diff --git a/package/php/Config.ext b/package/php/Config.ext
index 1e8ca495a7..3a65f70b86 100644
--- a/package/php/Config.ext
+++ b/package/php/Config.ext
@@ -273,11 +273,6 @@ config BR2_PACKAGE_PHP_EXT_GMP
 
 comment "Other basic extensions"
 
-config BR2_PACKAGE_PHP_EXT_JSON
-	bool "JSON"
-	help
-	  JavaScript Object Serialization support
-
 config BR2_PACKAGE_PHP_EXT_TOKENIZER
 	bool "Tokenizer"
 	help
@@ -363,13 +358,6 @@ config BR2_PACKAGE_PHP_EXT_SOAP
 	help
 	  SOAP support
 
-config BR2_PACKAGE_PHP_EXT_XMLRPC
-	bool "XML-RPC"
-	select BR2_PACKAGE_PHP_EXT_LIBXML2
-	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
-	help
-	  XML-RPC support
-
 comment "XML manipulation"
 
 config BR2_PACKAGE_PHP_EXT_DOM
diff --git a/package/php/php.hash b/package/php/php.hash
index d91d6aec66..b1cb8f045e 100644
--- a/package/php/php.hash
+++ b/package/php/php.hash
@@ -1,5 +1,5 @@
 # From https://www.php.net/downloads.php
-sha256  1fa46ca6790d780bf2cb48961df65f0ca3640c4533f0bca743cd61b71cb66335  php-7.4.20.tar.xz
+sha256  d5fc2e4fc780a32404d88c360e3e0009bc725d936459668e9c2ac992f2d83654  php-8.0.7.tar.xz
 
 # License file
 sha256  a188db807d711536f71e27b7d36879d63480f7994dc18adc08e624b3c5430fff  LICENSE
diff --git a/package/php/php.mk b/package/php/php.mk
index 3e422c5ac1..af0b073d84 100644
--- a/package/php/php.mk
+++ b/package/php/php.mk
@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-PHP_VERSION = 7.4.20
-PHP_SITE = http://www.php.net/distributions
+PHP_VERSION = 8.0.7
+PHP_SITE = https://www.php.net/distributions
 PHP_SOURCE = php-$(PHP_VERSION).tar.xz
 PHP_INSTALL_STAGING = YES
 PHP_INSTALL_STAGING_OPTS = INSTALL_ROOT=$(STAGING_DIR) install
@@ -62,7 +62,7 @@ PHP_CXXFLAGS = $(TARGET_CXXFLAGS)
 # The OPcache extension isn't cross-compile friendly
 # Throw some defines here to avoid patching heavily
 ifeq ($(BR2_PACKAGE_PHP_EXT_OPCACHE),y)
-PHP_CONF_OPTS += --enable-opcache
+PHP_CONF_OPTS += --enable-opcache --disable-opcache-jit
 PHP_CONF_ENV += ac_cv_func_mprotect=yes
 PHP_CFLAGS += \
 	-DHAVE_SHM_IPC \
@@ -90,7 +90,7 @@ PHP_CONF_OPTS += --with-apxs2=$(STAGING_DIR)/usr/bin/apxs
 
 # Enable thread safety option if Apache MPM is event or worker
 ifeq ($(BR2_PACKAGE_APACHE_MPM_EVENT)$(BR2_PACKAGE_APACHE_MPM_WORKER),y)
-PHP_CONF_OPTS += --enable-maintainer-zts
+PHP_CONF_OPTS += --enable-zts
 endif
 endif
 
@@ -107,7 +107,6 @@ PHP_CONF_OPTS += \
 	$(if $(BR2_PACKAGE_PHP_EXT_XMLWRITER),--enable-xmlwriter) \
 	$(if $(BR2_PACKAGE_PHP_EXT_EXIF),--enable-exif) \
 	$(if $(BR2_PACKAGE_PHP_EXT_FTP),--enable-ftp) \
-	$(if $(BR2_PACKAGE_PHP_EXT_JSON),--enable-json) \
 	$(if $(BR2_PACKAGE_PHP_EXT_TOKENIZER),--enable-tokenizer) \
 	$(if $(BR2_PACKAGE_PHP_EXT_PCNTL),--enable-pcntl) \
 	$(if $(BR2_PACKAGE_PHP_EXT_SHMOP),--enable-shmop) \
@@ -161,13 +160,6 @@ PHP_CONF_OPTS += --enable-wddx --with-libexpat-dir=$(STAGING_DIR)/usr
 PHP_DEPENDENCIES += expat
 endif
 
-ifeq ($(BR2_PACKAGE_PHP_EXT_XMLRPC),y)
-PHP_CONF_OPTS += \
-	--with-xmlrpc \
-	$(if $(BR2_PACKAGE_LIBICONV),--with-iconv-dir=$(STAGING_DIR)/usr)
-PHP_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBICONV),libiconv)
-endif
-
 ifeq ($(BR2_PACKAGE_PHP_EXT_ZIP),y)
 PHP_DEPENDENCIES += libzip
 endif
-- 
2.31.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Buildroot] [PATCH 01/11] package/php-amqp: bump version to 1.10.2
  2021-06-29 16:50 [Buildroot] [PATCH 01/11] package/php-amqp: bump version to 1.10.2 Adam Duskett
                   ` (9 preceding siblings ...)
  2021-06-29 16:50 ` [Buildroot] [PATCH 11/11] package/php: bump version to 8.0.7 Adam Duskett
@ 2021-07-03 20:03 ` Thomas Petazzoni
  10 siblings, 0 replies; 12+ messages in thread
From: Thomas Petazzoni @ 2021-07-03 20:03 UTC (permalink / raw)
  To: buildroot

On Tue, 29 Jun 2021 09:50:44 -0700
Adam Duskett <aduskett@gmail.com> wrote:

> Signed-off-by: Adam Duskett <aduskett@gmail.com>
> ---
>  package/php-amqp/php-amqp.hash | 4 ++--
>  package/php-amqp/php-amqp.mk   | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)

Thanks, I have applied the entire series to master. The only thing I
changed was in PATCH 11/11: I did not keep BR2_PACKAGE_PHP_EXT_JSON in
Config.in.legacy. Indeed, as it is now always enabled in PHP, there's
no point in keeping a legacy entry: people who had the option enabled,
will still have the feature, so there's no point in warning them about
this.

Thanks a lot for this work! I hope php-amqp will soon make a new
release to be able to drop the large patch.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-07-03 20:03 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-29 16:50 [Buildroot] [PATCH 01/11] package/php-amqp: bump version to 1.10.2 Adam Duskett
2021-06-29 16:50 ` [Buildroot] [PATCH 02/11] package/php-gnupg: bump version to 1.5.0 Adam Duskett
2021-06-29 16:50 ` [Buildroot] [PATCH 03/11] package/php-imagick: bump version to 3.5.0 Adam Duskett
2021-06-29 16:50 ` [Buildroot] [PATCH 04/11] package/php-memcached: bump version to 3.1.5 Adam Duskett
2021-06-29 16:50 ` [Buildroot] [PATCH 05/11] package/php-ssh2: bump version to 1.3.1 Adam Duskett
2021-06-29 16:50 ` [Buildroot] [PATCH 06/11] package/php-xdebug: bump version to 3.0.4 Adam Duskett
2021-06-29 16:50 ` [Buildroot] [PATCH 07/11] package/php-yaml: bump version to 2.2.1 Adam Duskett
2021-06-29 16:50 ` [Buildroot] [PATCH 08/11] package/php-zmq: add upstream php8 compatibility patches Adam Duskett
2021-06-29 16:50 ` [Buildroot] [PATCH 09/11] package/php-geoip: add php8 build support Adam Duskett
2021-06-29 16:50 ` [Buildroot] [PATCH 10/11] package/php-amqp: add add upstream php8 compatibility patches Adam Duskett
2021-06-29 16:50 ` [Buildroot] [PATCH 11/11] package/php: bump version to 8.0.7 Adam Duskett
2021-07-03 20:03 ` [Buildroot] [PATCH 01/11] package/php-amqp: bump version to 1.10.2 Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.