@@ -29,6 +29,7 @@ extern "C"
2929#include " zend_closures.h"
3030#include " ext/spl/spl_exceptions.h"
3131#include " zend_exceptions.h"
32+ #include " zend_attributes.h"
3233}
3334
3435/* {{{ Class Entries */
@@ -899,11 +900,27 @@ PHP_MINIT_FUNCTION(v8js_v8object_class) /* {{{ */
899900 php_ce_v8object->ce_flags |= ZEND_ACC_FINAL;
900901 php_ce_v8object->create_object = v8js_v8object_new;
901902
903+ #if PHP_VERSION_ID >= 80200
904+ php_ce_v8object->ce_flags |= ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES;
905+
906+ zend_string *attribute_name_AllowDynamicProperties_class_v8object = zend_string_init_interned (" AllowDynamicProperties" , sizeof (" AllowDynamicProperties" ) - 1 , 1 );
907+ zend_add_class_attribute (php_ce_v8object, attribute_name_AllowDynamicProperties_class_v8object, 0 );
908+ zend_string_release (attribute_name_AllowDynamicProperties_class_v8object);
909+ #endif
910+
902911 /* V8Function Class */
903912 INIT_CLASS_ENTRY (ce, " V8Function" , v8js_v8function_methods);
904913 php_ce_v8function = zend_register_internal_class (&ce);
905914 php_ce_v8function->ce_flags |= ZEND_ACC_FINAL;
906915 php_ce_v8function->create_object = v8js_v8object_new;
916+
917+ #if PHP_VERSION_ID >= 80200
918+ php_ce_v8function->ce_flags |= ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES;
919+
920+ zend_string *attribute_name_AllowDynamicProperties_class_v8function = zend_string_init_interned (" AllowDynamicProperties" , sizeof (" AllowDynamicProperties" ) - 1 , 1 );
921+ zend_add_class_attribute (php_ce_v8function, attribute_name_AllowDynamicProperties_class_v8function, 0 );
922+ zend_string_release (attribute_name_AllowDynamicProperties_class_v8function);
923+ #endif
907924
908925 /* V8Generator Class */
909926 INIT_CLASS_ENTRY (ce, " V8Generator" , v8js_v8generator_methods);
0 commit comments