@@ -39,6 +39,7 @@ PHP_MINIT_FUNCTION (php_v8_enums) {
3939 #define this_ce php_v8_access_control_class_entry
4040 INIT_NS_CLASS_ENTRY (ce, PHP_V8_NS, " AccessControl" , php_v8_enum_methods);
4141 this_ce = zend_register_internal_class (&ce);
42+ this_ce->ce_flags |= ZEND_ACC_FINAL;
4243
4344 zend_declare_class_constant_long (this_ce, ZEND_STRL (" DEFAULT_ACCESS" ), v8::AccessControl::DEFAULT);
4445 zend_declare_class_constant_long (this_ce, ZEND_STRL (" ALL_CAN_READ" ), v8::AccessControl::ALL_CAN_READ);
@@ -49,6 +50,7 @@ PHP_MINIT_FUNCTION (php_v8_enums) {
4950 #define this_ce php_v8_constructor_behavior_class_entry
5051 INIT_NS_CLASS_ENTRY (ce, PHP_V8_NS, " ConstructorBehavior" , php_v8_enum_methods);
5152 this_ce = zend_register_internal_class (&ce);
53+ this_ce->ce_flags |= ZEND_ACC_FINAL;
5254
5355 zend_declare_class_constant_long (this_ce, ZEND_STRL (" THROW" ), static_cast <long >(v8::ConstructorBehavior::kThrow ));
5456 zend_declare_class_constant_long (this_ce, ZEND_STRL (" ALLOW" ), static_cast <long >(v8::ConstructorBehavior::kAllow ));
@@ -59,6 +61,7 @@ PHP_MINIT_FUNCTION (php_v8_enums) {
5961 #define this_ce php_v8_integrity_level_class_entry
6062 INIT_NS_CLASS_ENTRY (ce, PHP_V8_NS, " IntegrityLevel" , php_v8_enum_methods);
6163 this_ce = zend_register_internal_class (&ce);
64+ this_ce->ce_flags |= ZEND_ACC_FINAL;
6265
6366 zend_declare_class_constant_long (this_ce, ZEND_STRL (" FROZEN" ), static_cast <zend_long>(v8::IntegrityLevel::kFrozen ));
6467 zend_declare_class_constant_long (this_ce, ZEND_STRL (" SEALED" ), static_cast <zend_long>(v8::IntegrityLevel::kSealed ));
@@ -68,6 +71,7 @@ PHP_MINIT_FUNCTION (php_v8_enums) {
6871 #define this_ce php_v8_property_attribute_class_entry
6972 INIT_NS_CLASS_ENTRY (ce, PHP_V8_NS, " PropertyAttribute" , php_v8_enum_methods);
7073 this_ce = zend_register_internal_class (&ce);
74+ this_ce->ce_flags |= ZEND_ACC_FINAL;
7175
7276 zend_declare_class_constant_long (this_ce, ZEND_STRL (" NONE" ), v8::PropertyAttribute::None);
7377 zend_declare_class_constant_long (this_ce, ZEND_STRL (" READ_ONLY" ), v8::PropertyAttribute::ReadOnly);
@@ -80,6 +84,7 @@ PHP_MINIT_FUNCTION (php_v8_enums) {
8084 #define this_ce php_v8_property_handler_flags_class_entry
8185 INIT_NS_CLASS_ENTRY (ce, PHP_V8_NS, " PropertyHandlerFlags" , php_v8_enum_methods);
8286 this_ce = zend_register_internal_class (&ce);
87+ this_ce->ce_flags |= ZEND_ACC_FINAL;
8388
8489 zend_declare_class_constant_long (this_ce, ZEND_STRL (" NONE" ), static_cast <zend_long>(v8::PropertyHandlerFlags::kNone ));
8590 zend_declare_class_constant_long (this_ce, ZEND_STRL (" ALL_CAN_READ" ), static_cast <zend_long>(v8::PropertyHandlerFlags::kAllCanRead ));
@@ -91,6 +96,7 @@ PHP_MINIT_FUNCTION (php_v8_enums) {
9196 #define this_ce php_v8_property_filter_class_entry
9297 INIT_NS_CLASS_ENTRY (ce, PHP_V8_NS, " PropertyFilter" , php_v8_enum_methods);
9398 this_ce = zend_register_internal_class (&ce);
99+ this_ce->ce_flags |= ZEND_ACC_FINAL;
94100
95101 zend_declare_class_constant_long (this_ce, ZEND_STRL (" ALL_PROPERTIES" ), v8::PropertyFilter::ALL_PROPERTIES);
96102 zend_declare_class_constant_long (this_ce, ZEND_STRL (" ONLY_WRITABLE" ), v8::PropertyFilter::ONLY_WRITABLE);
@@ -104,6 +110,7 @@ PHP_MINIT_FUNCTION (php_v8_enums) {
104110 #define this_ce php_v8_key_collection_mode_class_entry
105111 INIT_NS_CLASS_ENTRY (ce, PHP_V8_NS, " KeyCollectionMode" , php_v8_enum_methods);
106112 this_ce = zend_register_internal_class (&ce);
113+ this_ce->ce_flags |= ZEND_ACC_FINAL;
107114
108115 zend_declare_class_constant_long (this_ce, ZEND_STRL (" OWN_ONLY" ), static_cast <zend_long>(v8::KeyCollectionMode::kOwnOnly ));
109116 zend_declare_class_constant_long (this_ce, ZEND_STRL (" INCLUDE_PROTOTYPES" ), static_cast <zend_long>(v8::KeyCollectionMode::kIncludePrototypes ));
@@ -113,6 +120,7 @@ PHP_MINIT_FUNCTION (php_v8_enums) {
113120 #define this_ce php_v8_index_filter_class_entry
114121 INIT_NS_CLASS_ENTRY (ce, PHP_V8_NS, " IndexFilter" , php_v8_enum_methods);
115122 this_ce = zend_register_internal_class (&ce);
123+ this_ce->ce_flags |= ZEND_ACC_FINAL;
116124
117125 zend_declare_class_constant_long (this_ce, ZEND_STRL (" INCLUDE_INDICES" ), static_cast <zend_long>(v8::IndexFilter::kIncludeIndices ));
118126 zend_declare_class_constant_long (this_ce, ZEND_STRL (" SKIP_INDICES" ), static_cast <zend_long>(v8::IndexFilter::kSkipIndices ));
0 commit comments