Skip to content

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

Merged
merged 6 commits into from
Oct 14, 2020
Merged

PHPC-1631: Support PHP 8 #1166

merged 6 commits into from
Oct 14, 2020

Conversation

jmikola
Copy link
Member

@jmikola jmikola commented Oct 10, 2020

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.

@jmikola jmikola force-pushed the phpc-1631 branch 3 times, most recently from 119dff2 to ccd09a5 Compare October 10, 2020 16:13
@jmikola jmikola changed the title [WIP] PHPC-1631: Support PHP 8 PHPC-1631: Support PHP 8 Oct 10, 2020
@jmikola jmikola requested a review from alcaeus October 10, 2020 16:24
@jmikola jmikola marked this pull request as ready for review October 10, 2020 16:24
@jmikola jmikola force-pushed the phpc-1631 branch 2 times, most recently from 697576d to 10db461 Compare October 10, 2020 17:03
@alcaeus alcaeus force-pushed the phpc-1631 branch 3 times, most recently from 28940c8 to f8de983 Compare October 13, 2020 13:22
alcaeus and others added 5 commits October 13, 2020 15:24
* 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
@alcaeus alcaeus merged commit 8e4cefa into mongodb:master Oct 14, 2020
@@ -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
Copy link

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 ?

Copy link
Member

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.

Copy link

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 😄

@jmikola jmikola deleted the phpc-1631 branch July 25, 2022 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants