Skip to content

Commit 7aa2d35

Browse files
committed
Zend parameter renames amendment
Closes GH-6228
1 parent de2d38d commit 7aa2d35

6 files changed

+16
-16
lines changed

Zend/tests/015.phpt

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ var_dump(trigger_error("error", E_USER_DEPRECATED));
2323
--EXPECTF--
2424
Notice: error in %s on line %d
2525
bool(true)
26-
trigger_error(): Argument #2 ($error_type) must be one of E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, or E_USER_DEPRECATED
27-
trigger_error(): Argument #2 ($error_type) must be one of E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, or E_USER_DEPRECATED
26+
trigger_error(): Argument #2 ($error_level) must be one of E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, or E_USER_DEPRECATED
27+
trigger_error(): Argument #2 ($error_level) must be one of E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, or E_USER_DEPRECATED
2828

2929
Warning: error in %s on line %d
3030
bool(true)

Zend/tests/exception_handler_004.phpt

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ try {
1616

1717
?>
1818
--EXPECT--
19-
set_exception_handler(): Argument #1 ($exception_handler) must be a valid callback or null, function "fo" not found or invalid function name
20-
set_exception_handler(): Argument #1 ($exception_handler) must be a valid callback or null, class "" not found
19+
set_exception_handler(): Argument #1 ($callback) must be a valid callback or null, function "fo" not found or invalid function name
20+
set_exception_handler(): Argument #1 ($callback) must be a valid callback or null, class "" not found

Zend/zend_builtin_functions.stub.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -68,18 +68,18 @@ function get_included_files(): array {}
6868
/** @alias get_included_files */
6969
function get_required_files(): array {}
7070

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

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

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

7979
function restore_error_handler(): bool {}
8080

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

8484
function restore_exception_handler(): bool {}
8585

Zend/zend_builtin_functions_arginfo.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: fed3b572fbcae7bda87efc377b56e027da12b511 */
2+
* Stub hash: 9a77101b93e8584315bf43305830e129d359b033 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_version, 0, 0, IS_STRING, 0)
55
ZEND_END_ARG_INFO()
@@ -124,21 +124,21 @@ ZEND_END_ARG_INFO()
124124

125125
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_trigger_error, 0, 1, _IS_BOOL, 0)
126126
ZEND_ARG_TYPE_INFO(0, message, IS_STRING, 0)
127-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, error_type, IS_LONG, 0, "E_USER_NOTICE")
127+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, error_level, IS_LONG, 0, "E_USER_NOTICE")
128128
ZEND_END_ARG_INFO()
129129

130130
#define arginfo_user_error arginfo_trigger_error
131131

132132
ZEND_BEGIN_ARG_INFO_EX(arginfo_set_error_handler, 0, 0, 1)
133-
ZEND_ARG_TYPE_INFO(0, error_handler, IS_CALLABLE, 1)
134-
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, error_types, IS_LONG, 0, "E_ALL")
133+
ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 1)
134+
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, error_levels, IS_LONG, 0, "E_ALL")
135135
ZEND_END_ARG_INFO()
136136

137137
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_restore_error_handler, 0, 0, _IS_BOOL, 0)
138138
ZEND_END_ARG_INFO()
139139

140140
ZEND_BEGIN_ARG_INFO_EX(arginfo_set_exception_handler, 0, 0, 1)
141-
ZEND_ARG_TYPE_INFO(0, exception_handler, IS_CALLABLE, 1)
141+
ZEND_ARG_TYPE_INFO(0, callback, IS_CALLABLE, 1)
142142
ZEND_END_ARG_INFO()
143143

144144
#define arginfo_restore_exception_handler arginfo_restore_error_handler

Zend/zend_closures.stub.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public static function bind(
1414

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

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

1919
public static function fromCallable(callable $callback): Closure {}
2020
}

Zend/zend_closures_arginfo.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 6c9840dd5c2e4c597cd0133bf2d0b523c272d3fe */
2+
* Stub hash: 0a2dd53716d30893aa5dd92a9907b2298abb3f70 */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Closure___construct, 0, 0, 0)
55
ZEND_END_ARG_INFO()
@@ -17,7 +17,7 @@ ZEND_END_ARG_INFO()
1717

1818
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Closure_call, 0, 1, IS_MIXED, 0)
1919
ZEND_ARG_TYPE_INFO(0, newThis, IS_OBJECT, 0)
20-
ZEND_ARG_VARIADIC_TYPE_INFO(0, arguments, IS_MIXED, 0)
20+
ZEND_ARG_VARIADIC_TYPE_INFO(0, args, IS_MIXED, 0)
2121
ZEND_END_ARG_INFO()
2222

2323
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Closure_fromCallable, 0, 1, Closure, 0)

0 commit comments

Comments
 (0)