Skip to content

Zend parameter renames amendment #6228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Zend/tests/015.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ var_dump(trigger_error("error", E_USER_DEPRECATED));
--EXPECTF--
Notice: error in %s on line %d
bool(true)
trigger_error(): Argument #2 ($error_type) must be one of E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, or E_USER_DEPRECATED
trigger_error(): Argument #2 ($error_type) must be one of E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, or E_USER_DEPRECATED
trigger_error(): Argument #2 ($error_level) must be one of E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, or E_USER_DEPRECATED
trigger_error(): Argument #2 ($error_level) must be one of E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, or E_USER_DEPRECATED

Warning: error in %s on line %d
bool(true)
Expand Down
4 changes: 2 additions & 2 deletions Zend/tests/exception_handler_004.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ try {

?>
--EXPECT--
set_exception_handler(): Argument #1 ($exception_handler) must be a valid callback or null, function "fo" not found or invalid function name
set_exception_handler(): Argument #1 ($exception_handler) must be a valid callback or null, class "" not found
set_exception_handler(): Argument #1 ($callback) must be a valid callback or null, function "fo" not found or invalid function name
set_exception_handler(): Argument #1 ($callback) must be a valid callback or null, class "" not found
8 changes: 4 additions & 4 deletions Zend/zend_builtin_functions.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,18 @@ function get_included_files(): array {}
/** @alias get_included_files */
function get_required_files(): array {}

function trigger_error(string $message, int $error_type = E_USER_NOTICE): bool {}
function trigger_error(string $message, int $error_level = E_USER_NOTICE): bool {}

/** @alias trigger_error */
function user_error(string $message, int $error_type = E_USER_NOTICE): bool {}
function user_error(string $message, int $error_level = E_USER_NOTICE): bool {}

/** @return string|array|object|null */
function set_error_handler(?callable $error_handler, int $error_types = E_ALL) {}
function set_error_handler(?callable $callback, int $error_levels = E_ALL) {}

function restore_error_handler(): bool {}

/** @return string|array|object|null */
function set_exception_handler(?callable $exception_handler) {}
function set_exception_handler(?callable $callback) {}

function restore_exception_handler(): bool {}

Expand Down
10 changes: 5 additions & 5 deletions Zend/zend_builtin_functions_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: fed3b572fbcae7bda87efc377b56e027da12b511 */
* Stub hash: 9a77101b93e8584315bf43305830e129d359b033 */

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_version, 0, 0, IS_STRING, 0)
ZEND_END_ARG_INFO()
Expand Down Expand Up @@ -124,21 +124,21 @@ ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_trigger_error, 0, 1, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, error_type, IS_LONG, 0, "E_USER_NOTICE")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, error_level, IS_LONG, 0, "E_USER_NOTICE")
ZEND_END_ARG_INFO()

#define arginfo_user_error arginfo_trigger_error

ZEND_BEGIN_ARG_INFO_EX(arginfo_set_error_handler, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, error_handler, IS_CALLABLE, 1)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, error_types, IS_LONG, 0, "E_ALL")
ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 1)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, error_levels, IS_LONG, 0, "E_ALL")
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_restore_error_handler, 0, 0, _IS_BOOL, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_set_exception_handler, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, exception_handler, IS_CALLABLE, 1)
ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 1)
ZEND_END_ARG_INFO()

#define arginfo_restore_exception_handler arginfo_restore_error_handler
Expand Down
2 changes: 1 addition & 1 deletion Zend/zend_closures.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static function bind(

public function bindTo(?object $newThis, object|string|null $newScope = "static"): ?Closure {}

public function call(object $newThis, mixed ...$arguments): mixed {}
public function call(object $newThis, mixed ...$args): mixed {}

public static function fromCallable(callable $callback): Closure {}
}
4 changes: 2 additions & 2 deletions Zend/zend_closures_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 6c9840dd5c2e4c597cd0133bf2d0b523c272d3fe */
* Stub hash: 0a2dd53716d30893aa5dd92a9907b2298abb3f70 */

ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Closure___construct, 0, 0, 0)
ZEND_END_ARG_INFO()
Expand All @@ -17,7 +17,7 @@ ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Closure_call, 0, 1, IS_MIXED, 0)
ZEND_ARG_TYPE_INFO(0, newThis, IS_OBJECT, 0)
ZEND_ARG_VARIADIC_TYPE_INFO(0, arguments, IS_MIXED, 0)
ZEND_ARG_VARIADIC_TYPE_INFO(0, args, IS_MIXED, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Closure_fromCallable, 0, 1, Closure, 0)
Expand Down