Skip to content
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

Php7.3 #74

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Php7.3 #74

wants to merge 6 commits into from

Conversation

VHDev
Copy link

@VHDev VHDev commented Jan 18, 2020

ZEND_HASH_APPLY_PROTECTION and nApplyCount member are deprecated in php 7.3.

From UPGRADING.INTERNALS

c. Protection from recursion during processing circular data structures was
refactored. HashTable.nApplyCount and IS_OBJ_APPLY_COUNT are replaced by
single flag GC_PROTECTED. Corresponding macros Z_OBJ_APPLY_COUNT,
Z_OBJ_INC_APPLY_COUNT, Z_OBJ_DEC_APPLY_COUNT, ZEND_HASH_GET_APPLY_COUNT,
ZEND_HASH_INC_APPLY_COUNT, ZEND_HASH_DEC_APPLY_COUNT are replaced with
GC_IS_RECURSIVE, GC_PROTECT_RECURSION, GC_UNPROTECT_RECURSION,
Z_IS_RECURSIVE, Z_PROTECT_RECURSION, Z_UNPROTECT_RECURSION.

 HASH_FLAG_APPLY_PROTECTION flag and ZEND_HASH_APPLY_PROTECTION() macro
 are removed. All mutable arrays should use recursion protection.
 Corresponding checks should be replaced by Z_REFCOUNTED() or
 !(GC_GLAGS(p) & GC_IMMUTABLE).

Found excellent examples here: https://news-web.php.net/php.cvs/99639

I'm new to PHP internals, but thought I'd take a crack at this as I need to get it working with php7.3. It seems to have compiled, tested successfully, and is working correctly in the dev environment. I stumbled upon the inline hash protection function idea from PHP Mongo development team.
mongodb/mongo-php-driver@197f3f7

Also, a sincere thank you. This project is really a huge help. Impressive work!
DV

@VHDev
Copy link
Author

VHDev commented Jan 18, 2020

Patch

@marinhekman marinhekman mentioned this pull request Dec 3, 2021
@marinhekman
Copy link

@patrickallaert so is this going to be merged ? I would like a new pecl build which supports 7.3+ . Also a Windows dll build would be nice (latest is 2.0.3 on https://pecl.php.net/package/APM)

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