Skip to content

Commit 293a201

Browse files
authored
Merge pull request #508 from chrisbckr/php82-AllowDynamicProperties
PHP 8.2 compatibility
2 parents 7515dde + fab7a68 commit 293a201

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

tests/array_access_002.phpt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Test V8::executeString() : Use ArrayAccess with JavaScript native push method
66
v8js.use_array_access = 1
77
--FILE--
88
<?php
9+
#[AllowDynamicProperties]
910
class MyArray implements ArrayAccess, Countable {
1011
private $data = Array('one', 'two', 'three');
1112

tests/js-construct-protected-ctor.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ object(V8JsScriptException)#%d (13) {
5252
["file":protected]=>
5353
string(%d) "%s"
5454
["line":protected]=>
55-
int(29)
55+
int(%d)
5656
["trace":"Exception":private]=>
5757
array(1) {
5858
[0]=>
5959
array(6) {
6060
["file"]=>
6161
string(%d) "%s"
6262
["line"]=>
63-
int(29)
63+
int(%d)
6464
["function"]=>
6565
string(13) "executeString"
6666
["class"]=>

v8js_object_export.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,9 @@ static void v8js_named_property_enumerator(const v8::PropertyCallbackInfo<v8::Ar
395395
IS_MAGIC_FUNC(ZEND_UNSET_FUNC_NAME) ||
396396
IS_MAGIC_FUNC(ZEND_CALL_FUNC_NAME) ||
397397
IS_MAGIC_FUNC(ZEND_INVOKE_FUNC_NAME) ||
398-
IS_MAGIC_FUNC(ZEND_ISSET_FUNC_NAME)) {
398+
IS_MAGIC_FUNC(ZEND_ISSET_FUNC_NAME) ||
399+
IS_MAGIC_FUNC("__serialize") ||
400+
IS_MAGIC_FUNC("__unserialize")) {
399401
continue;
400402
}
401403

0 commit comments

Comments
 (0)