-
Notifications
You must be signed in to change notification settings - Fork 208
PHPC-1631: Support PHP 8 #1166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHPC-1631: Support PHP 8 #1166
Conversation
119dff2
to
ccd09a5
Compare
697576d
to
10db461
Compare
28940c8
to
f8de983
Compare
* PHPC-1689: Remove remainder of TSRMLS_* macros * PHPC-1689: Add compatibility macro for PHP 8 object change * PHPC-1689: Replace PHP_CHECK_GCC_ARG with AX_CHECK_COMPILE_FLAG * PHPC-1689: phongo_compat_object_handler_type and macros * PHPC-1689: clone_object handlers * PHPC-1689: compare_object handlers * PHPC-1689: replace zend_hash_init_ex with zend_hash_init * PHPC-1689: get_debug_info and get_properties handlers
@@ -502,6 +516,9 @@ void php_phongo_cursor_init_ce(INIT_FUNC_ARGS) /* {{{ */ | |||
PHONGO_CE_DISABLE_SERIALIZATION(php_phongo_cursor_ce); | |||
php_phongo_cursor_ce->get_iterator = php_phongo_cursor_get_iterator; | |||
|
|||
#if PHP_VERSION_ID >= 80000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not implementing IteratorAggregate on all PHP versions ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the internal iterator only exists on PHP 8, we decided to only implement this on PHP 8 for the time being. You can find some more motivation in the original ticket: https://jira.mongodb.org/browse/PHPC-1690.
I may end up revisiting this sooner than later depending on how PHPLIB reacts to these changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, I forgot that the internal iterator is a PHP 8 feature. That's a good reason then 😄
https://jira.mongodb.org/browse/PHPC-1631
This is rebased on #1167 for a memory leak fix that turned up while testing.
@alcaeus: When merging, please squash commits into one per issue so various bug fixes get cross-referenced accordingly. The bulk of changes for PHPC-1689 can be rolled up into one commit, though.