Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

PHP version 8.4 compatibility #205

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions teds.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions teds_cachediterable.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 0 additions & 2 deletions teds_immutableiterable.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 0 additions & 2 deletions teds_mutableiterable.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 0 additions & 2 deletions teds_stricthashmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 1 addition & 2 deletions teds_stricthashset.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
3 changes: 1 addition & 2 deletions teds_strictheap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
2 changes: 0 additions & 2 deletions teds_strictsortedvectormap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 0 additions & 2 deletions teds_strictsortedvectorset.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 0 additions & 2 deletions teds_stricttreemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 1 addition & 2 deletions teds_stricttreeset.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
2 changes: 1 addition & 1 deletion tests/iterable/any_array.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions tests/iterable/fold_traversable.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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!"
2 changes: 1 addition & 1 deletion tests/iterable/none_array.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions tests/misc/strict_hash.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ foreach ($values as $value) {
$all[$hash] = $value;
}
?>
--EXPECT--
--EXPECTF--
NULL
=> 0x06742e765a0a0214
bool(false)
Expand Down Expand Up @@ -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)
Expand All @@ -170,4 +170,4 @@ float(NAN)
float(NAN)
=> 0x6a289d03903422a8 (Already saw)
float(NAN)
=> 0x6a289d03903422a8 (Already saw)
=> 0x6a289d03903422a8 (Already saw)
Loading