0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-09-19 15:25:19 +00:00

remove deprected V8Js::checkString function

This commit is contained in:
Stefan Siegl 2022-05-31 09:57:52 +02:00
parent f6a93c3cd6
commit bfd2bfc2df
2 changed files with 0 additions and 51 deletions

View File

@ -1,24 +0,0 @@
--TEST--
Test V8::executeString() : Script validator test
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--FILE--
<?php
$v8 = new V8Js();
var_dump($v8->checkString('print("Hello World!");'));
try {
var_dump($v8->checkString('print("Hello World!);'));
} catch (V8JsScriptException $e) {
var_dump($e->getMessage());
}
?>
===EOF===
--EXPECTF--
Deprecated: %s V8Js::checkString() is deprecated in %s on line %d
bool(true)
Deprecated: %s V8Js::checkString() is deprecated in %s on line %d
string(%d) "V8Js::checkString():1: SyntaxError: %s"
===EOF===

View File

@ -669,32 +669,6 @@ static PHP_METHOD(V8Js, executeScript)
}
/* }}} */
/* {{{ proto mixed V8Js::checkString(string script)
*/
static PHP_METHOD(V8Js, checkString)
{
zend_string *str = NULL;
zend_string *identifier = zend_string_init("V8Js::checkString()", 19, 0);
v8js_script *res = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &str) == FAILURE) {
return;
}
v8js_compile_script(getThis(), str, identifier, &res);
zend_string_release(identifier);
if (!res) {
RETURN_FALSE;
}
v8js_script_free(res);
efree(res);
RETURN_TRUE;
}
/* }}} */
/* {{{ proto void V8Js::setModuleNormaliser(string base, string module_id)
*/
static PHP_METHOD(V8Js, setModuleNormaliser)
@ -987,7 +961,6 @@ const zend_function_entry v8js_methods[] = { /* {{{ */
PHP_ME(V8Js, executeString, arginfo_v8js_executestring, ZEND_ACC_PUBLIC)
PHP_ME(V8Js, compileString, arginfo_v8js_compilestring, ZEND_ACC_PUBLIC)
PHP_ME(V8Js, executeScript, arginfo_v8js_executescript, ZEND_ACC_PUBLIC)
PHP_ME(V8Js, checkString, arginfo_v8js_checkstring, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED)
PHP_ME(V8Js, setModuleNormaliser, arginfo_v8js_setmodulenormaliser, ZEND_ACC_PUBLIC)
PHP_ME(V8Js, setModuleLoader, arginfo_v8js_setmoduleloader, ZEND_ACC_PUBLIC)
PHP_ME(V8Js, setTimeLimit, arginfo_v8js_settimelimit, ZEND_ACC_PUBLIC)