Skip to content

Commit 87790d6

Browse files
committed
Merge branch 'v1.9'
2 parents ddfe1c3 + de42fab commit 87790d6

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
php-version:
2424
- "7.4"
2525
- "8.0"
26+
- "8.1"
2627
mongodb-version:
2728
- "4.4"
2829
topology:

src/MongoDB/BulkWrite.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
#include <php.h>
1818
#include <Zend/zend_interfaces.h>
19-
#include <ext/spl/spl_iterators.h>
2019

2120
#ifdef HAVE_CONFIG_H
2221
#include "config.h"
@@ -27,6 +26,11 @@
2726
#include "php_phongo.h"
2827
#include "php_bson.h"
2928

29+
#if PHP_VERSION_ID < 70200
30+
#include <ext/spl/spl_iterators.h>
31+
#define zend_ce_countable spl_ce_Countable
32+
#endif /* PHP_VERSION_ID < 70200 */
33+
3034
#define PHONGO_BULKWRITE_BYPASS_UNSET -1
3135

3236
zend_class_entry* php_phongo_bulkwrite_ce;
@@ -669,7 +673,7 @@ void php_phongo_bulkwrite_init_ce(INIT_FUNC_ARGS) /* {{{ */
669673
php_phongo_handler_bulkwrite.free_obj = php_phongo_bulkwrite_free_object;
670674
php_phongo_handler_bulkwrite.offset = XtOffsetOf(php_phongo_bulkwrite_t, std);
671675

672-
zend_class_implements(php_phongo_bulkwrite_ce, 1, spl_ce_Countable);
676+
zend_class_implements(php_phongo_bulkwrite_ce, 1, zend_ce_countable);
673677
} /* }}} */
674678

675679
/*

0 commit comments

Comments
 (0)