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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
|
From e608bd4ffc07a32ef381cd69fa401ed051e8ae3b Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Tue, 1 Oct 2024 15:15:18 +0200
Subject: [PATCH 1/2] Fix headers for change in 8.4
---
teds.h | 2 ++
teds_cachediterable.c | 2 --
teds_immutableiterable.c | 2 --
teds_mutableiterable.c | 2 --
teds_stricthashmap.c | 2 --
teds_stricthashset.c | 3 +--
teds_strictheap.c | 3 +--
teds_strictsortedvectormap.c | 2 --
teds_strictsortedvectorset.c | 2 --
teds_stricttreemap.c | 2 --
teds_stricttreeset.c | 3 +--
11 files changed, 5 insertions(+), 20 deletions(-)
diff --git a/teds.h b/teds.h
index 5164fa7..80df012 100644
--- a/teds.h
+++ b/teds.h
@@ -2,7 +2,9 @@
#define TEDS_H
#include "zend_API.h"
+#if PHP_VERSION_ID < 80400
#include "ext/spl/spl_engine.h"
+#endif
#include "teds_bswap.h"
#define TEDS_MINIT_IGNORE_UNUSED() do { (void) type; (void) module_number; } while (0)
diff --git a/teds_cachediterable.c b/teds_cachediterable.c
index 7a6aa51..1970712 100644
--- a/teds_cachediterable.c
+++ b/teds_cachediterable.c
@@ -25,8 +25,6 @@
#include "teds_cachediterable.h"
#include "teds_exceptions.h"
#include "teds_immutableiterable.h"
-// #include "ext/spl/spl_functions.h"
-#include "ext/spl/spl_engine.h"
#include "ext/spl/spl_exceptions.h"
#include "ext/spl/spl_iterators.h"
#include "ext/json/php_json.h"
diff --git a/teds_immutableiterable.c b/teds_immutableiterable.c
index 54fb123..c28a9a5 100644
--- a/teds_immutableiterable.c
+++ b/teds_immutableiterable.c
@@ -24,8 +24,6 @@
#include "teds_immutableiterable_arginfo.h"
#include "teds_immutableiterable.h"
#include "teds_exceptions.h"
-// #include "ext/spl/spl_functions.h"
-#include "ext/spl/spl_engine.h"
#include "ext/spl/spl_exceptions.h"
#include "ext/spl/spl_iterators.h"
#include "ext/json/php_json.h"
diff --git a/teds_mutableiterable.c b/teds_mutableiterable.c
index 2a890c1..17894cb 100644
--- a/teds_mutableiterable.c
+++ b/teds_mutableiterable.c
@@ -22,8 +22,6 @@
#include "teds_mutableiterable_arginfo.h"
#include "teds_mutableiterable.h"
#include "teds_immutableiterable.h"
-// #include "ext/spl/spl_functions.h"
-#include "ext/spl/spl_engine.h"
#include "ext/spl/spl_exceptions.h"
#include "ext/spl/spl_iterators.h"
#include "ext/json/php_json.h"
diff --git a/teds_stricthashmap.c b/teds_stricthashmap.c
index 7570ebc..af3e078 100644
--- a/teds_stricthashmap.c
+++ b/teds_stricthashmap.c
@@ -26,8 +26,6 @@
#include "teds_interfaces.h"
#include "teds_exceptions.h"
#include "teds.h"
-// #include "ext/spl/spl_functions.h"
-#include "ext/spl/spl_engine.h"
#include "ext/spl/spl_exceptions.h"
#include "ext/spl/spl_iterators.h"
#include "ext/json/php_json.h"
diff --git a/teds_stricthashset.c b/teds_stricthashset.c
index 4ff33ea..b706f01 100644
--- a/teds_stricthashset.c
+++ b/teds_stricthashset.c
@@ -33,11 +33,10 @@
#include "teds_util.h"
#include "teds_interfaces.h"
#include "teds.h"
-// #include "ext/spl/spl_functions.h"
-#include "ext/spl/spl_engine.h"
#include "ext/spl/spl_exceptions.h"
#include "ext/spl/spl_iterators.h"
#include "ext/json/php_json.h"
+#include "Zend/zend_interfaces.h"
#include <stdbool.h>
diff --git a/teds_strictheap.c b/teds_strictheap.c
index 38456fa..dfc1265 100644
--- a/teds_strictheap.c
+++ b/teds_strictheap.c
@@ -24,11 +24,10 @@
#include "teds_util.h"
#include "teds.h"
#include "teds_interfaces.h"
-// #include "ext/spl/spl_functions.h"
-#include "ext/spl/spl_engine.h"
#include "ext/spl/spl_exceptions.h"
#include "ext/spl/spl_iterators.h"
#include "ext/json/php_json.h"
+#include "Zend/zend_interfaces.h"
#include <stdbool.h>
diff --git a/teds_strictsortedvectormap.c b/teds_strictsortedvectormap.c
index 5b0a443..1b6f8a6 100644
--- a/teds_strictsortedvectormap.c
+++ b/teds_strictsortedvectormap.c
@@ -26,8 +26,6 @@
#include "teds_exceptions.h"
#include "teds_mutableiterable.h"
#include "teds.h"
-// #include "ext/spl/spl_functions.h"
-#include "ext/spl/spl_engine.h"
#include "ext/spl/spl_exceptions.h"
#include "ext/spl/spl_iterators.h"
#include "ext/json/php_json.h"
diff --git a/teds_strictsortedvectorset.c b/teds_strictsortedvectorset.c
index 348a58f..4db20f0 100644
--- a/teds_strictsortedvectorset.c
+++ b/teds_strictsortedvectorset.c
@@ -27,8 +27,6 @@
#include "teds_exceptions.h"
#include "teds_vector.h"
#include "teds.h"
-// #include "ext/spl/spl_functions.h"
-#include "ext/spl/spl_engine.h"
#include "ext/spl/spl_exceptions.h"
#include "ext/spl/spl_iterators.h"
#include "ext/json/php_json.h"
diff --git a/teds_stricttreemap.c b/teds_stricttreemap.c
index 89efe4f..c51afa5 100644
--- a/teds_stricttreemap.c
+++ b/teds_stricttreemap.c
@@ -24,8 +24,6 @@
#include "teds_interfaces.h"
#include "teds_exceptions.h"
#include "teds.h"
-// #include "ext/spl/spl_functions.h"
-#include "ext/spl/spl_engine.h"
#include "ext/spl/spl_exceptions.h"
#include "ext/spl/spl_iterators.h"
#include "ext/json/php_json.h"
diff --git a/teds_stricttreeset.c b/teds_stricttreeset.c
index 748c478..0829404 100644
--- a/teds_stricttreeset.c
+++ b/teds_stricttreeset.c
@@ -23,11 +23,10 @@
#include "teds_util.h"
#include "teds_interfaces.h"
#include "teds.h"
-// #include "ext/spl/spl_functions.h"
-#include "ext/spl/spl_engine.h"
#include "ext/spl/spl_exceptions.h"
#include "ext/spl/spl_iterators.h"
#include "ext/json/php_json.h"
+#include "Zend/zend_interfaces.h"
#include <stdbool.h>
From c27d117239c9e389d7f3116c524306bfd410667a Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Tue, 1 Oct 2024 15:15:57 +0200
Subject: [PATCH 2/2] Fix test expectation for PHP 8.4
---
tests/iterable/any_array.phpt | 2 +-
tests/iterable/fold_traversable.phpt | 6 +++---
tests/iterable/none_array.phpt | 2 +-
tests/misc/strict_hash.phpt | 8 ++++----
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/tests/iterable/any_array.phpt b/tests/iterable/any_array.phpt
index 09e28aa..ebee711 100644
--- a/tests/iterable/any_array.phpt
+++ b/tests/iterable/any_array.phpt
@@ -72,7 +72,7 @@ bool(true)
int(2)
*** Testing second argument to predicate ***
-Caught ArgumentCountError: Too few arguments to function {closure}(), 1 passed and exactly 2 expected
+Caught ArgumentCountError: Too few arguments to function {closur%s}(), 1 passed and exactly 2 expected
*** Testing edge cases ***
bool(false)
diff --git a/tests/iterable/fold_traversable.phpt b/tests/iterable/fold_traversable.phpt
index 5b013b1..1ce0d4a 100644
--- a/tests/iterable/fold_traversable.phpt
+++ b/tests/iterable/fold_traversable.phpt
@@ -46,9 +46,9 @@ string(10) "helloworld"
string(12) "HELLO WORLD!"
string(12) "HELLO WORLD!"
-Warning: {closure}(): Argument #1 ($carry) must be passed by reference, value given in %s on line 12
+Warning: {closur%s}(): Argument #1 ($carry) must be passed by reference, value given in %s on line 12
-Warning: {closure}(): Argument #1 ($carry) must be passed by reference, value given in %s on line 12
+Warning: {closur%s}(): Argument #1 ($carry) must be passed by reference, value given in %s on line 12
-Warning: {closure}(): Argument #1 ($carry) must be passed by reference, value given in %s on line 12
+Warning: {closur%s}(): Argument #1 ($carry) must be passed by reference, value given in %s on line 12
string(12) "HELLO WORLD!"
diff --git a/tests/iterable/none_array.phpt b/tests/iterable/none_array.phpt
index 5e69706..ad49054 100644
--- a/tests/iterable/none_array.phpt
+++ b/tests/iterable/none_array.phpt
@@ -72,7 +72,7 @@ bool(false)
int(2)
*** Testing second argument to predicate ***
-Caught ArgumentCountError: Too few arguments to function {closure}(), 1 passed and exactly 2 expected
+Caught ArgumentCountError: Too few arguments to function {closur%s}(), 1 passed and exactly 2 expected
*** Testing edge cases ***
bool(true)
diff --git a/tests/misc/strict_hash.phpt b/tests/misc/strict_hash.phpt
index 8202f82..8ab86ef 100644
--- a/tests/misc/strict_hash.phpt
+++ b/tests/misc/strict_hash.phpt
@@ -64,7 +64,7 @@ foreach ($values as $value) {
$all[$hash] = $value;
}
?>
---EXPECT--
+--EXPECTF--
NULL
=> 0x06742e765a0a0214
bool(false)
@@ -153,10 +153,10 @@ object(stdClass)#1 (0) {
object(stdClass)#2 (0) {
}
=> 0xb8d3134c0b865909
-object(Closure)#3 (0) {
+object(Closure)#3 (%d) {%A
}
=> 0x91bcd0ffe3de8667
-object(Closure)#4 (0) {
+object(Closure)#4 (%d) {%A
}
=> 0x6aa58db3bc37b4c5
resource(1) of type (stream)
@@ -170,4 +170,4 @@ float(NAN)
float(NAN)
=> 0x6a289d03903422a8 (Already saw)
float(NAN)
-=> 0x6a289d03903422a8 (Already saw)
\ No newline at end of file
+=> 0x6a289d03903422a8 (Already saw)
|