phpv8 / v8js

V8 Javascript Engine for PHP — This PHP extension embeds the Google V8 Javascript Engine
http://pecl.php.net/package/v8js
MIT License
1.84k stars 200 forks source link

PHP 7.3 compatibility #362

Closed Jan-E closed 6 years ago

Jan-E commented 6 years ago

PHP 7.3 has some internal changes.

The ZEND_HASH macros are removed: https://github.com/php/php-src/blob/master/UPGRADING.INTERNALS#L55

zend_fcall_info_cache.initialized is removed. zend_fcall_info_cache is initialized if zend_fcall_info_cache.function_handler is set. https://github.com/php/php-src/blob/master/UPGRADING.INTERNALS#L103

Due to these changes I am getting the following errors on Windows:

v8js_convert.cc(73): error C3861: 'ZEND_HASH_GET_APPLY_COUNT': identifier not found
v8js_convert.cc(89): error C3861: 'ZEND_HASH_INC_APPLY_COUNT': identifier not found
v8js_convert.cc(95): error C3861: 'ZEND_HASH_DEC_APPLY_COUNT': identifier not found
v8js_exceptions.cc(91): error C2105: '++' needs l-value
v8js_object_export.cc(140): error C2039: 'initialized': is not a member of '_zend_fcall_info_cache'
v8js_object_export.cc(962): error C3861: 'ZEND_HASH_INC_APPLY_COUNT': identifier not found
v8js_object_export.cc(969): error C3861: 'ZEND_HASH_DEC_APPLY_COUNT': identifier not found
v8js_object_export.cc(993): error C3861: 'ZEND_HASH_DEC_APPLY_COUNT': identifier not found
v8js_object_export.cc(1016): error C3861: 'ZEND_HASH_GET_APPLY_COUNT': identifier not found
v8js_v8object_class.cc(213): error C2065: 'gc_active': undeclared identifier
v8js_v8object_class.cc(213): error C3861: 'GC_G': identifier not found
v8js_convert.cc(73): error C3861: 'ZEND_HASH_GET_APPLY_COUNT': identifier not found
v8js_convert.cc(89): error C3861: 'ZEND_HASH_INC_APPLY_COUNT': identifier not found
v8js_convert.cc(95): error C3861: 'ZEND_HASH_DEC_APPLY_COUNT': identifier not found
v8js_exceptions.cc(91): error C2105: '++' needs l-value
v8js_object_export.cc(140): error C2039: 'initialized': is not a member of '_zend_fcall_info_cache'
v8js_object_export.cc(962): error C3861: 'ZEND_HASH_INC_APPLY_COUNT': identifier not found
v8js_object_export.cc(969): error C3861: 'ZEND_HASH_DEC_APPLY_COUNT': identifier not found
v8js_object_export.cc(993): error C3861: 'ZEND_HASH_DEC_APPLY_COUNT': identifier not found
v8js_object_export.cc(1016): error C3861: 'ZEND_HASH_GET_APPLY_COUNT': identifier not found
v8js_v8object_class.cc(213): error C2065: 'gc_active': undeclared identifier
v8js_v8object_class.cc(213): error C3861: 'GC_G': identifier not found
v8js_convert.cc(73): error C3861: 'ZEND_HASH_GET_APPLY_COUNT': identifier not found
v8js_convert.cc(89): error C3861: 'ZEND_HASH_INC_APPLY_COUNT': identifier not found
v8js_convert.cc(95): error C3861: 'ZEND_HASH_DEC_APPLY_COUNT': identifier not found
v8js_exceptions.cc(91): error C2105: '++' needs l-value
v8js_object_export.cc(140): error C2039: 'initialized': is not a member of '_zend_fcall_info_cache'
v8js_object_export.cc(962): error C3861: 'ZEND_HASH_INC_APPLY_COUNT': identifier not found
v8js_object_export.cc(969): error C3861: 'ZEND_HASH_DEC_APPLY_COUNT': identifier not found
v8js_object_export.cc(993): error C3861: 'ZEND_HASH_DEC_APPLY_COUNT': identifier not found
v8js_object_export.cc(1016): error C3861: 'ZEND_HASH_GET_APPLY_COUNT': identifier not found
v8js_v8object_class.cc(213): error C2065: 'gc_active': undeclared identifier
v8js_v8object_class.cc(213): error C3861: 'GC_G': identifier not found
v8js_convert.cc(73): error C3861: 'ZEND_HASH_GET_APPLY_COUNT': identifier not found
v8js_convert.cc(89): error C3861: 'ZEND_HASH_INC_APPLY_COUNT': identifier not found
v8js_convert.cc(95): error C3861: 'ZEND_HASH_DEC_APPLY_COUNT': identifier not found
v8js_exceptions.cc(91): error C2105: '++' needs l-value
v8js_object_export.cc(140): error C2039: 'initialized': is not a member of '_zend_fcall_info_cache'
v8js_object_export.cc(962): error C3861: 'ZEND_HASH_INC_APPLY_COUNT': identifier not found
v8js_object_export.cc(969): error C3861: 'ZEND_HASH_DEC_APPLY_COUNT': identifier not found
v8js_object_export.cc(993): error C3861: 'ZEND_HASH_DEC_APPLY_COUNT': identifier not found
v8js_object_export.cc(1016): error C3861: 'ZEND_HASH_GET_APPLY_COUNT': identifier not found
v8js_v8object_class.cc(213): error C2065: 'gc_active': undeclared identifier
v8js_v8object_class.cc(213): error C3861: 'GC_G': identifier not found
stesie commented 6 years ago

I haven't yet looked into PHP 7.3 compatibility. Would you like to work on this issue, or do you just want to point out there's work to be done?

Jan-E commented 6 years ago

For the moment, I just wanted to point out the issue.

Jan-E commented 6 years ago

See discussions https://github.com/phpv8/v8js/pull/363 and https://github.com/phpv8/v8js/pull/364