summaryrefslogtreecommitdiffstats
path: root/event-upstream.patch
blob: 396011cc0e23fa9cabb018dfc43c78c4b0155a52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
From 935302065af825f82fbbc3e6e93eb83f408c9121 Mon Sep 17 00:00:00 2001
From: Ruslan Osmanov <rrosmanov@gmail.com>
Date: Mon, 23 Apr 2018 15:15:29 +0700
Subject: [PATCH] Fixed tests/12-serialization.phpt

---
 package.xml                 | 23 +++++++++++++++++++----
 php5/php_event.h            |  2 +-
 php7/php_event.h            |  2 +-
 tests/12-serialization.phpt |  2 +-
 4 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/tests/12-serialization.phpt b/tests/12-serialization.phpt
index 2a8f15d..d5945df 100644
--- a/tests/12-serialization.phpt
+++ b/tests/12-serialization.phpt
@@ -22,7 +22,7 @@ $http_connection = new $eventHttpConnectionClass($base, null, "0.0.0.0", 9099);
 $config  = new $eventConfigClass;
 
 if (class_exists($eventSslContextClass)) {
-    $ssl_context = new $eventSslContextClass($eventSslContextClass::SSLv3_SERVER_METHOD, []);
+    $ssl_context = new $eventSslContextClass($eventSslContextClass::TLS_SERVER_METHOD, []);
     serialize($ssl_context);
 }
 
-- 
2.10.5

From 5827e342d81f196f35601a6227852e9a075f9df1 Mon Sep 17 00:00:00 2001
From: Ruslan Osmanov <rrosmanov@gmail.com>
Date: Mon, 23 Apr 2018 15:36:51 +0700
Subject: [PATCH] Fixed PHP 5.4-related issue in tests/12-serialization.phpt

---
 tests/12-serialization.phpt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/12-serialization.phpt b/tests/12-serialization.phpt
index d5945df..e37b2b1 100644
--- a/tests/12-serialization.phpt
+++ b/tests/12-serialization.phpt
@@ -38,7 +38,7 @@ echo "1 - ok\n";
 
 /////////////////////////////////////////////
 
-foreach ([ $base, $http, $http_request, $http_connection, $config, $listener ] as &$object) {
+foreach ([ $base, $http, $http_request, $http_connection, $config, $listener ] as $object) {
     try {
         serialize($object);
     } catch (\Exception $e) {
-- 
2.10.5

From 0ea49e828fac05f17f258f525420ed807bd81716 Mon Sep 17 00:00:00 2001
From: Ruslan Osmanov <rrosmanov@gmail.com>
Date: Mon, 23 Apr 2018 16:01:40 +0700
Subject: [PATCH] Fixed build errors in PHP 5.4

---
 tests/12-serialization.phpt | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/tests/12-serialization.phpt b/tests/12-serialization.phpt
index e37b2b1..82125a5 100644
--- a/tests/12-serialization.phpt
+++ b/tests/12-serialization.phpt
@@ -11,7 +11,6 @@ $eventHttpConnectionClass = EVENT_NS . '\\EventHttpConnection';
 $eventBaseClass = EVENT_NS . '\\EventBase';
 $eventHttpRequestClass = EVENT_NS . '\\EventHttpRequest';
 $eventSslContextClass = EVENT_NS . '\\EventSslContext';
-$eventExceptionClass = EVENT_NS . '\\EventException';
 
 $base = new $eventBaseClass();
 $listener = new $eventListenerClass($base, function () { }, null, 0, -1, '0.0.0.0:12345');
@@ -38,17 +37,26 @@ echo "1 - ok\n";
 
 /////////////////////////////////////////////
 
-foreach ([ $base, $http, $http_request, $http_connection, $config, $listener ] as $object) {
+function testSerializeEventObject($object) {
+    $eventExceptionClass = EVENT_NS . '\\EventException';
+
     try {
         serialize($object);
     } catch (\Exception $e) {
         echo get_class($object), ' - ',
             ($e instanceof $eventExceptionClass ? 'ok' : 'error - ' . get_class($e)),
             "\n";
-    } finally {
-        $object = null;
     }
 }
+
+testSerializeEventObject($base);
+testSerializeEventObject($http);
+testSerializeEventObject($http_request);
+testSerializeEventObject($http_connection);
+testSerializeEventObject($config);
+testSerializeEventObject($listener);
+
+
 ?>
 --EXPECTF--
 1 - ok
-- 
2.10.5