Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6386e9d

Browse files
committed
adapt code to handle php 8.4 too (based on @JoshuaBehrens & @rbro work) and fix some tests
Signed-off-by: Romain Gautier <mail@romain.sh>
1 parent 5234490 commit 6386e9d

9 files changed

+13
-13
lines changed

‎tests/commonjs_exception_001.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ $v8->executeString($JS, 'module.js', V8Js::FLAG_PROPAGATE_PHP_EXCEPTIONS);
2020
--EXPECTF--
2121
Fatal error: Uncaught Exception: some exception in %s%ecommonjs_exception_001.php:9
2222
Stack trace:
23-
#0 [internal function]: {closure}('test')
23+
#0 [internal function]: {closur%s}('test')
2424
#1 %s%ecommonjs_exception_001.php(12): V8Js->executeString('var foo = requi...', 'module.js', 4)
2525
#2 {main}
2626

2727
Next V8JsScriptException: module.js:1: Exception: some exception in %s%ecommonjs_exception_001.php:9
2828
Stack trace:
29-
#0 [internal function]: {closure}('test')
29+
#0 [internal function]: {closur%s}('test')
3030
#1 %s%ecommonjs_exception_001.php(12): V8Js->executeString('var foo = requi...', 'module.js', 4)
3131
#2 {main} in %s%ecommonjs_exception_001.php:12
3232
Stack trace:

‎tests/commonjs_exception_002.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ $v8->executeString($JS, 'module.js', V8Js::FLAG_PROPAGATE_PHP_EXCEPTIONS);
2323
--EXPECTF--
2424
Fatal error: Uncaught Exception: some exception in %s%ecommonjs_exception_002.php:9
2525
Stack trace:
26-
#0 [internal function]: {closure}('', './test')
26+
#0 [internal function]: {closur%s}('', './test')
2727
#1 %s%ecommonjs_exception_002.php(15): V8Js->executeString('var foo = requi...', 'module.js', 4)
2828
#2 {main}
2929

3030
Next V8JsScriptException: module.js:1: Exception: some exception in %s%ecommonjs_exception_002.php:9
3131
Stack trace:
32-
#0 [internal function]: {closure}('', './test')
32+
#0 [internal function]: {closur%s}('', './test')
3333
#1 %s%ecommonjs_exception_002.php(15): V8Js->executeString('var foo = requi...', 'module.js', 4)
3434
#2 {main} in %s%ecommonjs_exception_002.php:15
3535
Stack trace:

‎tests/commonjs_fatal_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Test V8Js::setModuleLoader : Handle fatal errors gracefully
77
$v8 = new V8Js();
88

99
$v8->setModuleLoader(function() {
10-
trigger_error('some fatal error', E_USER_ERROR);
10+
@trigger_error('some fatal error', E_USER_ERROR);
1111
});
1212

1313
$v8->executeString(' require("foo"); ');

‎tests/fatal_error_no_uninstall_inner_frame.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ nothing.
2929

3030
Fatal error: Uncaught Error: Call to a member function foo() on null in %s%efatal_error_no_uninstall_inner_frame.php:15
3131
Stack trace:
32-
#0 [internal function]: {closure}()
32+
#0 [internal function]: {closur%s}()
3333
#1 [internal function]: Closure->__invoke()
3434
#2 %s%efatal_error_no_uninstall_inner_frame.php(18): V8Js->executeString('PHP.foo();')
3535
#3 {main}

‎tests/fatal_error_recursive.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ foo
3737

3838
Fatal error: Uncaught Error: Call to a member function bar() on null in %s%efatal_error_recursive.php:7
3939
Stack trace:
40-
#0 [internal function]: {closure}()
40+
#0 [internal function]: {closur%s}()
4141
#1 [internal function]: Closure->__invoke()
4242
#2 %s%efatal_error_recursive.php(12): V8Js->executeString('PHP.baz();')
43-
#3 [internal function]: {closure}()
43+
#3 [internal function]: {closur%s}()
4444
#4 [internal function]: Closure->__invoke()
4545
#5 %s%efatal_error_recursive.php(17): V8Js->executeString('PHP.bar();')
46-
#6 [internal function]: {closure}()
46+
#6 [internal function]: {closur%s}()
4747
#7 [internal function]: Closure->__invoke()
4848
#8 %s%efatal_error_recursive.php(25): V8Js->executeString('PHP.nofail(); P...')
4949
#9 {main}

‎tests/fatal_error_rethrow.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ $js->executeString($script);
2525
--EXPECTF--
2626
Fatal error: Uncaught Error: Call to a member function bar() on %s in %s%efatal_error_rethrow.php:7
2727
Stack trace:
28-
#0 [internal function]: {closure}()
28+
#0 [internal function]: {closur%s}()
2929
#1 [internal function]: Closure->__invoke()
3030
#2 %s%efatal_error_rethrow.php(16): V8Js->executeString(%s)
3131
#3 {main}

‎tests/generators_from_v8_008.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ int(23)
3737

3838
Fatal error: Uncaught Exception: this shall not work in %s
3939
Stack trace:
40-
#0 [internal function]: {closure}()
40+
#0 [internal function]: {closur%s}()
4141
#1 [internal function]: Closure->__invoke()
4242
#2 %s: V8Generator->next()
4343
#3 {main}

‎tests/generators_from_v8_009.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ EOJS;
2222

2323
$v8 = new V8Js();
2424
$v8->getValue = function() {
25-
trigger_error("you're gonna fail now", E_USER_ERROR);
25+
@trigger_error("you're gonna fail now", E_USER_ERROR);
2626
};
2727
$gen = $v8->executeString($js);
2828

‎v8js_object_export.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ v8::Local<v8::Value> v8js_named_property_callback(v8::Isolate *isolate, v8::Loca
675675
ce = scope = object->ce;
676676

677677
/* First, check the (case-insensitive) method table */
678-
php_strtolower(lower, name_len);
678+
zend_str_tolower(lower, name_len);
679679
method_name = zend_string_init(lower, name_len, 0);
680680

681681
// toString() -> __tostring()

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /