From 40d699f525d9a3070a402a702521082279716281 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Tue, 9 Mar 2021 09:26:43 +0100 Subject: [PATCH] spl_ce_Countable -> zend_ce_countable --- package.xml | 50 +++++++++++++++++++++++++++++++----------- src/php_http_client.c | 2 +- src/php_http_message.c | 6 +---- 3 files changed, 39 insertions(+), 19 deletions(-) diff --git a/package.xml b/package.xml index d00487b..ad6853d 100644 --- a/package.xml +++ b/package.xml @@ -31,9 +31,9 @@ https://mdref.m6w6.name/http mike@php.net yes - 2021-01-13 + 2021-03-00 - 4.0.0 + 4.1.0 4.0.0 @@ -42,19 +42,43 @@ https://mdref.m6w6.name/http BSD-2-Clause *NOTE:* - v4.x is PHP-8 only. - * PHP 8 compatibility - - Drop ext-propro support - PHP 8 removes the object get/set API from the ZendEngine, which renders - that extension dysfunctional. As a consequence, the header property of - http\Message and derived classes cannot be modified in place, and thus - by reference. + * Added request options: + * http\Client\Curl::$abstract_unix_socket + * http\Client\Curl::$altsvc + * http\Client\Curl::$altsvc_ctrl + * http\Client\Curl::$aws_sigv4 + * http\Client\Curl::$doh_url + * http\Client\Curl::$dns_shuffle_addresses + * http\Client\Curl::$haproxy_protocol + * http\Client\Curl::$hsts + * http\Client\Curl::$hsts_ctrl + * http\Client\Curl::$http09_allowed + * http\Client\Curl::$maxage_conn + * http\Client\Curl::$pinned_publickey + * http\Client\Curl::$proxy_ssl + * http\Client\Curl::$socks5_auth + * http\Client\Curl::$tcp_fastopen + * http\Client\Curl::$tls13_ciphers + * http\Client\Curl::$xoauth2_bearer + * Added request option constants: + * http\Client\Curl\AUTH_AWS_SIGV4 + * http\Client\Curl\AUTH_BEARER + * http\Client\Curl\AUTH_NONE + * http\Client\Curl\HTTP_VERSION_2_PRIOR_KNOWLEDGE + * http\Client\Curl\HTTP_VERSION_3 + * http\Client\Curl\SSL_VERSION_MAX_* + * http\Client\Curl\SSL_VERSION_TLSv1_3 + * Added library version constants: + * http\Client\Curl\Versions\BROTLI + * http\Client\Curl\Versions\CAINFO + * http\Client\Curl\Versions\CAPATH + * http\Client\Curl\Versions\HYPER + * http\Client\Curl\Versions\ICONV + * http\Client\Curl\Versions\NGHTTP2 + * http\Client\Curl\Versions\QUIC + * http\Client\Curl\Versions\ZSTD - Changes from beta1: - * Fixed configure on systems which do not provide icu-config - * Fixed gh-issue #89: Cookie handling cannot be disabled since v3.2.1 ]]> diff --git a/src/php_http_client.c b/src/php_http_client.c index 69257f1..4e1ed37 100644 --- a/src/php_http_client.c +++ b/src/php_http_client.c @@ -1357,7 +1357,7 @@ PHP_MINIT_FUNCTION(http_client) INIT_NS_CLASS_ENTRY(ce, "http", "Client", php_http_client_methods); php_http_client_class_entry = zend_register_internal_class_ex(&ce, NULL); php_http_client_class_entry->create_object = php_http_client_object_new; - zend_class_implements(php_http_client_class_entry, 2, spl_ce_SplSubject, spl_ce_Countable); + zend_class_implements(php_http_client_class_entry, 2, spl_ce_SplSubject, zend_ce_countable); memcpy(&php_http_client_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); php_http_client_object_handlers.offset = XtOffsetOf(php_http_client_object_t, zo); php_http_client_object_handlers.free_obj = php_http_client_object_free; diff --git a/src/php_http_message.c b/src/php_http_message.c index 1bbc53c..1b8ecd2 100644 --- a/src/php_http_message.c +++ b/src/php_http_message.c @@ -2075,15 +2075,11 @@ PHP_MINIT_FUNCTION(http_message) php_http_message_object_handlers.read_property = php_http_message_object_read_prop; php_http_message_object_handlers.write_property = php_http_message_object_write_prop; php_http_message_object_handlers.get_debug_info = php_http_message_object_get_debug_info; -#if PHP_VERSION_ID >= 70400 php_http_message_object_handlers.get_property_ptr_ptr = php_http_message_object_get_prop_ptr; -#else - php_http_message_object_handlers.get_property_ptr_ptr = NULL; -#endif php_http_message_object_handlers.get_gc = php_http_message_object_get_gc; php_http_message_object_handlers.cast_object = php_http_message_object_cast; - zend_class_implements(php_http_message_class_entry, 3, spl_ce_Countable, zend_ce_serializable, zend_ce_iterator); + zend_class_implements(php_http_message_class_entry, 3, zend_ce_countable, zend_ce_serializable, zend_ce_iterator); zend_hash_init(&php_http_message_object_prophandlers, 9, NULL, php_http_message_object_prophandler_hash_dtor, 1); zend_declare_property_long(php_http_message_class_entry, ZEND_STRL("type"), PHP_HTTP_NONE, ZEND_ACC_PROTECTED); -- 2.30.2