Skip to content

Conversation

realityking
Copy link
Contributor

I liked the idea, recently mentioned on internals, to remove the use of resources on use object oriented APIs instead.

This pull request does just that, by introducing the class HashContext. It's targeted at master, since this should go into PHP 5.7.

Tests all pass, one required modification as it relied on the output of var_dump. The B/C break is very small, code that relies on checking is_resource() fails and needs to be changed to also do `ìnstanceof HashContext``.

A quick search on GitHub revealed no project that uses HashContext in the global namespace.

return;
}

zend_replace_error_handling(EH_THROW, NULL, &error_handling TSRMLS_CC);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error handling must be replaced before the zpp call already, otherwise you'll end up with new returning null.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed that, thanks.

@realityking
Copy link
Contributor Author

Closing in favor of #660. This way we can discuss the object oriented interface at a later time.

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.

2 participants