summaryrefslogtreecommitdiffstats
path: root/teds-php84.patch
diff options
context:
space:
mode:
Diffstat (limited to 'teds-php84.patch')
-rw-r--r--teds-php84.patch264
1 files changed, 264 insertions, 0 deletions
diff --git a/teds-php84.patch b/teds-php84.patch
new file mode 100644
index 0000000..773590b
--- /dev/null
+++ b/teds-php84.patch
@@ -0,0 +1,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)