From fab7a68717d98c3f525fdab9a451c65d84d446e1 Mon Sep 17 00:00:00 2001 From: Christiano Becker Date: Mon, 20 Feb 2023 08:09:13 -0300 Subject: [PATCH] PHP 8.2 compatibility * tests/array_access_002.phpt - added #[AllowDynamicProperties] to the class MyArray * tests/js-construct-protected-ctor.phpt - some change on how pph8.2 Exepctions references the line that caused the exception, when some call have multiple lines (eg: the executeString in this test), now references the line where the command started (first line) instead of the last line. * V8Js Object Export: added to not enumerate magic methods __serialize and __unserialize - this two methods was added to DateTime objects and was causing tests/var_dump.phpt failing. --- tests/array_access_002.phpt | 1 + tests/js-construct-protected-ctor.phpt | 4 ++-- v8js_object_export.cc | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/array_access_002.phpt b/tests/array_access_002.phpt index f8c6e88..641cb51 100644 --- a/tests/array_access_002.phpt +++ b/tests/array_access_002.phpt @@ -6,6 +6,7 @@ Test V8::executeString() : Use ArrayAccess with JavaScript native push method v8js.use_array_access = 1 --FILE-- string(%d) "%s" ["line":protected]=> - int(29) + int(%d) ["trace":"Exception":private]=> array(1) { [0]=> @@ -60,7 +60,7 @@ object(V8JsScriptException)#%d (13) { ["file"]=> string(%d) "%s" ["line"]=> - int(29) + int(%d) ["function"]=> string(13) "executeString" ["class"]=> diff --git a/v8js_object_export.cc b/v8js_object_export.cc index 2154d27..ea1a0f2 100644 --- a/v8js_object_export.cc +++ b/v8js_object_export.cc @@ -395,7 +395,9 @@ static void v8js_named_property_enumerator(const v8::PropertyCallbackInfo