Skip to content

Commit 2f74068

Browse files
SamMousailuuu1994
authored andcommitted
Implement stricter return type for getBackingType
Closes GH-8687
1 parent fc1b4a4 commit 2f74068

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ PHP NEWS
5555
- Reflection:
5656
. Added ReflectionFunction::isAnonymous(). (Nicolas Grekas)
5757
. Added ReflectionMethod::hasPrototype(). (Ollie Read)
58+
. Narrow ReflectionEnum::getBackingType() return type to ReflectionNamedType.
59+
(SamMousa)
5860

5961
- Session:
6062
. Fixed bug GH-7787 (Improve session write failure message for user error

ext/reflection/php_reflection_arginfo.h

Lines changed: 3 additions & 2 deletions
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: 4191864554b030bea40306c0d30090a8e2c76ab2 */
2+
* Stub hash: 9daec020902840b7f678d787e61e91f7e16ad4da */
33

44
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_Reflection_getModifierNames, 0, 1, IS_ARRAY, 0)
55
ZEND_ARG_TYPE_INFO(0, modifiers, IS_LONG, 0)
@@ -568,7 +568,8 @@ ZEND_END_ARG_INFO()
568568

569569
#define arginfo_class_ReflectionEnum_isBacked arginfo_class_ReflectionFunctionAbstract_hasTentativeReturnType
570570

571-
#define arginfo_class_ReflectionEnum_getBackingType arginfo_class_ReflectionFunctionAbstract_getTentativeReturnType
571+
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_ReflectionEnum_getBackingType, 0, 0, ReflectionNamedType, 1)
572+
ZEND_END_ARG_INFO()
572573

573574
#define arginfo_class_ReflectionEnumUnitCase___construct arginfo_class_ReflectionClassConstant___construct
574575

0 commit comments

Comments
 (0)