-
Notifications
You must be signed in to change notification settings - Fork 202
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
Dynamic Properties deprecation in PHP 8.2 #501
Labels
Comments
Maybe register_class_stdClass can help to figure out: static zend_class_entry *register_class_stdClass(void)
{
zend_class_entry ce, *class_entry;
INIT_CLASS_ENTRY(ce, "stdClass", class_stdClass_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
class_entry->ce_flags |= ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES;
zend_string *attribute_name_AllowDynamicProperties_class_stdClass = zend_string_init_interned("AllowDynamicProperties", sizeof("AllowDynamicProperties") - 1, 1);
zend_add_class_attribute(class_entry, attribute_name_AllowDynamicProperties_class_stdClass, 0);
zend_string_release(attribute_name_AllowDynamicProperties_class_stdClass);
return class_entry;
} I will run some tests. |
I've made the necessary changes for php8.2
|
Merged
@colinmollenhour yes, all issues should be resolved. Just forgot to close this ticket. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With PHP 8.2 the test suite actually works, but reports half of the tests failing, since they have deprecation notices like this:
... because of this: https://php.watch/versions/8.2/dynamic-properties-deprecated
It's likely best to tag all V8Js classes with
#[AllowDynamicProperties]
attribute to omit this notice.Need to find out how to programatically set this attribute in C++ code 🙂
The text was updated successfully, but these errors were encountered: