From: Máté Kocsis Date: Mon, 28 Sep 2020 21:02:42 +0000 (+0200) Subject: Reflection param renames amendment X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e19599287eb7c41f9cb7ecbff8f3a363b15971e9;p=php Reflection param renames amendment Closes GH-6230 --- diff --git a/ext/reflection/php_reflection.stub.php b/ext/reflection/php_reflection.stub.php index b150d1831d..bd0a6fe0a1 100644 --- a/ext/reflection/php_reflection.stub.php +++ b/ext/reflection/php_reflection.stub.php @@ -194,7 +194,7 @@ class ReflectionMethod extends ReflectionFunctionAbstract public function getPrototype() {} /** @return void */ - public function setAccessible(bool $isAccessible) {} + public function setAccessible(bool $accessible) {} } class ReflectionClass implements Reflector @@ -364,7 +364,7 @@ class ReflectionClass implements Reflector class ReflectionObject extends ReflectionClass { - public function __construct(object $argument) {} + public function __construct(object $object) {} } class ReflectionProperty implements Reflector @@ -415,7 +415,7 @@ class ReflectionProperty implements Reflector public function getDocComment() {} /** @return void */ - public function setAccessible(bool $isAccessible) {} + public function setAccessible(bool $accessible) {} /** @return ReflectionType|null */ public function getType() {} @@ -475,7 +475,7 @@ class ReflectionParameter implements Reflector final private function __clone() {} /** @param string|array|object $function */ - public function __construct($function, int|string $parameter) {} + public function __construct($function, int|string $param) {} public function __toString(): string {} diff --git a/ext/reflection/php_reflection_arginfo.h b/ext/reflection/php_reflection_arginfo.h index 5457b14d47..bd90c8cb68 100644 --- a/ext/reflection/php_reflection_arginfo.h +++ b/ext/reflection/php_reflection_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 35e17de0cdf6c11a315f6d10fd711492d1da567c */ + * Stub hash: f5f4cfeab0e81c2b51bf11dde7b7d40fc87d9cbc */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Reflection_getModifierNames, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, modifiers, IS_LONG, 0) @@ -144,7 +144,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_ReflectionMethod_getPrototype arginfo_class_ReflectionFunctionAbstract___clone ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionMethod_setAccessible, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, isAccessible, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO(0, accessible, _IS_BOOL, 0) ZEND_END_ARG_INFO() #define arginfo_class_ReflectionClass___clone arginfo_class_ReflectionFunctionAbstract___clone @@ -277,9 +277,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_ReflectionClass_getAttributes arginfo_class_ReflectionFunctionAbstract_getAttributes -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionObject___construct, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, argument, IS_OBJECT, 0) -ZEND_END_ARG_INFO() +#define arginfo_class_ReflectionObject___construct arginfo_class_ReflectionClass_isInstance #define arginfo_class_ReflectionProperty___clone arginfo_class_ReflectionFunctionAbstract___clone @@ -363,7 +361,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ReflectionParameter___construct, 0, 0, 2) ZEND_ARG_INFO(0, function) - ZEND_ARG_TYPE_MASK(0, parameter, MAY_BE_LONG|MAY_BE_STRING, NULL) + ZEND_ARG_TYPE_MASK(0, param, MAY_BE_LONG|MAY_BE_STRING, NULL) ZEND_END_ARG_INFO() #define arginfo_class_ReflectionParameter___toString arginfo_class_ReflectionFunction___toString diff --git a/ext/reflection/tests/parameters_001.phpt b/ext/reflection/tests/parameters_001.phpt index 8299a63bf9..d50d1a1e72 100644 --- a/ext/reflection/tests/parameters_001.phpt +++ b/ext/reflection/tests/parameters_001.phpt @@ -39,4 +39,4 @@ int(1) bool(false) bool(true) string(54) "The parameter specified by its name could not be found" -string(95) "ReflectionParameter::__construct(): Argument #2 ($parameter) must be greater than or equal to 0" +string(91) "ReflectionParameter::__construct(): Argument #2 ($param) must be greater than or equal to 0"