summaryrefslogtreecommitdiffstats
path: root/358.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-06-25 08:17:51 +0200
committerRemi Collet <remi@remirepo.net>2017-06-25 08:17:51 +0200
commit2bb6ae423b589fb579a34fb1e896c40e2ac75249 (patch)
tree963cf898f1db5e0d6036ac2b032ae290933d64e8 /358.patch
parent520be499d9b5c080ef2b0be04a75fc75d9822e1d (diff)
add patch for 7.2
Diffstat (limited to '358.patch')
-rw-r--r--358.patch188
1 files changed, 188 insertions, 0 deletions
diff --git a/358.patch b/358.patch
new file mode 100644
index 0000000..1468b2f
--- /dev/null
+++ b/358.patch
@@ -0,0 +1,188 @@
+From 7c96eeac28e5bf9dcfc63abfbc7fd832247c78ee Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Sun, 25 Jun 2017 08:03:41 +0200
+Subject: [PATCH] fix for PHP 7.2
+
+---
+ configs/yaf_config_ini.c | 6 ++++--
+ configs/yaf_config_simple.c | 6 ++++--
+ requests/yaf_request_http.c | 2 +-
+ requests/yaf_request_simple.c | 2 +-
+ yaf_application.c | 2 +-
+ yaf_dispatcher.c | 2 +-
+ yaf_loader.c | 2 +-
+ yaf_registry.c | 2 +-
+ yaf_session.c | 10 ++++++----
+ 9 files changed, 20 insertions(+), 14 deletions(-)
+
+diff --git a/configs/yaf_config_ini.c b/configs/yaf_config_ini.c
+index 77e00c6..b7987b9 100644
+--- a/configs/yaf_config_ini.c
++++ b/configs/yaf_config_ini.c
+@@ -31,7 +31,7 @@
+
+ zend_class_entry *yaf_config_ini_ce;
+
+-#ifdef HAVE_SPL
++#if defined(HAVE_SPL) && PHP_VERSION_ID < 70200
+ extern PHPAPI zend_class_entry *spl_ce_Countable;
+ #endif
+
+@@ -654,8 +654,10 @@ YAF_STARTUP_FUNCTION(config_ini) {
+ YAF_INIT_CLASS_ENTRY(ce, "Yaf_Config_Ini", "Yaf\\Config\\Ini", yaf_config_ini_methods);
+ yaf_config_ini_ce = zend_register_internal_class_ex(&ce, yaf_config_ce);
+
+-#ifdef HAVE_SPL
++#if defined(HAVE_SPL) && PHP_VERSION_ID < 70200
+ zend_class_implements(yaf_config_ini_ce, 3, zend_ce_iterator, zend_ce_arrayaccess, spl_ce_Countable);
++#elif PHP_VERSION_ID >= 70200
++ zend_class_implements(yaf_config_ini_ce, 3, zend_ce_iterator, zend_ce_arrayaccess, zend_ce_countable);
+ #else
+ zend_class_implements(yaf_config_ini_ce, 2, zend_ce_iterator, zend_ce_arrayaccess);
+ #endif
+diff --git a/configs/yaf_config_simple.c b/configs/yaf_config_simple.c
+index 8718613..ecf2094 100644
+--- a/configs/yaf_config_simple.c
++++ b/configs/yaf_config_simple.c
+@@ -30,7 +30,7 @@
+
+ zend_class_entry *yaf_config_simple_ce;
+
+-#ifdef HAVE_SPL
++#if defined(HAVE_SPL) && PHP_VERSION_ID < 70200
+ extern PHPAPI zend_class_entry *spl_ce_Countable;
+ #endif
+
+@@ -365,8 +365,10 @@ YAF_STARTUP_FUNCTION(config_simple) {
+ YAF_INIT_CLASS_ENTRY(ce, "Yaf_Config_Simple", "Yaf\\Config\\Simple", yaf_config_simple_methods);
+ yaf_config_simple_ce = zend_register_internal_class_ex(&ce, yaf_config_ce);
+
+-#ifdef HAVE_SPL
++#if defined(HAVE_SPL) && PHP_VERSION_ID < 70200
+ zend_class_implements(yaf_config_simple_ce, 3, zend_ce_iterator, zend_ce_arrayaccess, spl_ce_Countable);
++#elif PHP_VERSION_ID >= 70200
++ zend_class_implements(yaf_config_simple_ce, 3, zend_ce_iterator, zend_ce_arrayaccess, zend_ce_countable);
+ #else
+ zend_class_implements(yaf_config_simple_ce, 2, zend_ce_iterator, zend_ce_arrayaccess);
+ #endif
+diff --git a/requests/yaf_request_http.c b/requests/yaf_request_http.c
+index 48cede1..2e0b263 100644
+--- a/requests/yaf_request_http.c
++++ b/requests/yaf_request_http.c
+@@ -265,7 +265,7 @@ zend_function_entry yaf_request_http_methods[] = {
+ PHP_ME(yaf_request_http, get, NULL, ZEND_ACC_PUBLIC)
+ PHP_ME(yaf_request_http, isXmlHttpRequest, NULL, ZEND_ACC_PUBLIC)
+ PHP_ME(yaf_request_http, __construct, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
+- PHP_ME(yaf_request_http, __clone, NULL, ZEND_ACC_PRIVATE | ZEND_ACC_CLONE)
++ PHP_ME(yaf_request_http, __clone, NULL, ZEND_ACC_PRIVATE)
+ {NULL, NULL, NULL}
+ };
+ /* }}} */
+diff --git a/requests/yaf_request_simple.c b/requests/yaf_request_simple.c
+index 8652117..e4405c7 100644
+--- a/requests/yaf_request_simple.c
++++ b/requests/yaf_request_simple.c
+@@ -234,7 +234,7 @@ PHP_METHOD(yaf_request_simple, __clone) {
+ */
+ zend_function_entry yaf_request_simple_methods[] = {
+ PHP_ME(yaf_request_simple, __construct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR)
+- PHP_ME(yaf_request_simple, __clone, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_CLONE)
++ PHP_ME(yaf_request_simple, __clone, NULL, ZEND_ACC_PRIVATE)
+ PHP_ME(yaf_request_simple, getQuery, NULL, ZEND_ACC_PUBLIC)
+ PHP_ME(yaf_request_simple, getRequest, NULL, ZEND_ACC_PUBLIC)
+ PHP_ME(yaf_request_simple, getPost, NULL, ZEND_ACC_PUBLIC)
+diff --git a/yaf_application.c b/yaf_application.c
+index a4bc554..fe7ec77 100644
+--- a/yaf_application.c
++++ b/yaf_application.c
+@@ -651,7 +651,7 @@ zend_function_entry yaf_application_methods[] = {
+ PHP_ME(yaf_application, getLastErrorMsg, yaf_application_void_arginfo, ZEND_ACC_PUBLIC)
+ PHP_ME(yaf_application, clearLastError, yaf_application_void_arginfo, ZEND_ACC_PUBLIC)
+ PHP_ME(yaf_application, __destruct, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_DTOR)
+- PHP_ME(yaf_application, __clone, NULL, ZEND_ACC_PRIVATE | ZEND_ACC_CLONE)
++ PHP_ME(yaf_application, __clone, NULL, ZEND_ACC_PRIVATE)
+ PHP_ME(yaf_application, __sleep, NULL, ZEND_ACC_PRIVATE)
+ PHP_ME(yaf_application, __wakeup, NULL, ZEND_ACC_PRIVATE)
+ {NULL, NULL, NULL}
+diff --git a/yaf_dispatcher.c b/yaf_dispatcher.c
+index 9967972..f20b40a 100644
+--- a/yaf_dispatcher.c
++++ b/yaf_dispatcher.c
+@@ -1314,7 +1314,7 @@ PHP_METHOD(yaf_dispatcher, __clone) {
+ */
+ zend_function_entry yaf_dispatcher_methods[] = {
+ PHP_ME(yaf_dispatcher, __construct, NULL, ZEND_ACC_PRIVATE | ZEND_ACC_CTOR)
+- PHP_ME(yaf_dispatcher, __clone, NULL, ZEND_ACC_PRIVATE | ZEND_ACC_CLONE)
++ PHP_ME(yaf_dispatcher, __clone, NULL, ZEND_ACC_PRIVATE)
+ PHP_ME(yaf_dispatcher, __sleep, NULL, ZEND_ACC_PRIVATE)
+ PHP_ME(yaf_dispatcher, __wakeup, NULL, ZEND_ACC_PRIVATE)
+ PHP_ME(yaf_dispatcher, enableView, yaf_dispatcher_void_arginfo, ZEND_ACC_PUBLIC)
+diff --git a/yaf_loader.c b/yaf_loader.c
+index 2010551..62e34e9 100644
+--- a/yaf_loader.c
++++ b/yaf_loader.c
+@@ -764,7 +764,7 @@ PHP_FUNCTION(yaf_override_spl_autoload) {
+ */
+ zend_function_entry yaf_loader_methods[] = {
+ PHP_ME(yaf_loader, __construct, yaf_loader_void_arginfo, ZEND_ACC_PRIVATE|ZEND_ACC_CTOR)
+- PHP_ME(yaf_loader, __clone, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_CLONE)
++ PHP_ME(yaf_loader, __clone, NULL, ZEND_ACC_PRIVATE)
+ PHP_ME(yaf_loader, __sleep, NULL, ZEND_ACC_PRIVATE)
+ PHP_ME(yaf_loader, __wakeup, NULL, ZEND_ACC_PRIVATE)
+ PHP_ME(yaf_loader, autoload, yaf_loader_autoloader_arginfo, ZEND_ACC_PUBLIC)
+diff --git a/yaf_registry.c b/yaf_registry.c
+index e7649e7..891b47b 100644
+--- a/yaf_registry.c
++++ b/yaf_registry.c
+@@ -186,7 +186,7 @@ PHP_METHOD(yaf_registry, getInstance) {
+ */
+ zend_function_entry yaf_registry_methods[] = {
+ PHP_ME(yaf_registry, __construct, NULL, ZEND_ACC_CTOR|ZEND_ACC_PRIVATE)
+- PHP_ME(yaf_registry, __clone, NULL, ZEND_ACC_CLONE|ZEND_ACC_PRIVATE)
++ PHP_ME(yaf_registry, __clone, NULL, ZEND_ACC_PRIVATE)
+ PHP_ME(yaf_registry, get, yaf_registry_get_arginfo, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
+ PHP_ME(yaf_registry, has, yaf_registry_has_arginfo, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
+ PHP_ME(yaf_registry, set, yaf_registry_set_arginfo, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
+diff --git a/yaf_session.c b/yaf_session.c
+index 1b2d05f..ff48291 100644
+--- a/yaf_session.c
++++ b/yaf_session.c
+@@ -19,7 +19,7 @@
+ #endif
+
+ #include "php.h"
+-#include "Zend/zend_interfaces.h" /* for zend_ce_iterator */
++#include "Zend/zend_interfaces.h" /* for zend_ce_iterator, zend_ce_countable*/
+
+ #include "php_yaf.h"
+ #include "yaf_namespace.h"
+@@ -28,7 +28,7 @@
+
+ zend_class_entry *yaf_session_ce;
+
+-#ifdef HAVE_SPL
++#if defined(HAVE_SPL) && PHP_VERSION_ID < 70200
+ extern PHPAPI zend_class_entry *spl_ce_Countable;
+ #endif
+
+@@ -320,7 +320,7 @@ PHP_METHOD(yaf_session, valid) {
+ */
+ zend_function_entry yaf_session_methods[] = {
+ PHP_ME(yaf_session, __construct, NULL, ZEND_ACC_CTOR|ZEND_ACC_PRIVATE)
+- PHP_ME(yaf_session, __clone, NULL, ZEND_ACC_CLONE|ZEND_ACC_PRIVATE)
++ PHP_ME(yaf_session, __clone, NULL, ZEND_ACC_PRIVATE)
+ PHP_ME(yaf_session, __sleep, NULL, ZEND_ACC_PRIVATE)
+ PHP_ME(yaf_session, __wakeup, NULL, ZEND_ACC_PRIVATE)
+ PHP_ME(yaf_session, getInstance, yaf_session_void_arginfo, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
+@@ -358,8 +358,10 @@ YAF_STARTUP_FUNCTION(session) {
+ yaf_session_ce = zend_register_internal_class_ex(&ce, NULL);
+ yaf_session_ce->ce_flags |= ZEND_ACC_FINAL;
+
+-#ifdef HAVE_SPL
++#if defined(HAVE_SPL) && PHP_VERSION_ID < 70200
+ zend_class_implements(yaf_session_ce, 3, zend_ce_iterator, zend_ce_arrayaccess, spl_ce_Countable);
++#elif PHP_VERSION_ID >= 70200
++ zend_class_implements(yaf_session_ce, 3, zend_ce_iterator, zend_ce_arrayaccess, zend_ce_countable);
+ #else
+ zend_class_implements(yaf_session_ce, 2, zend_ce_iterator, zend_ce_arrayaccess);
+ #endif