Skip to content

Commit dab114c

Browse files
committed
Workaround issue with ReflectionEnumUnitCase::getValue()
1 parent 35b9ed5 commit dab114c

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

ext/reflection/php_reflection.stub.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -714,8 +714,11 @@ public function __construct(object|string $class, string $constant) {}
714714

715715
public function getEnum(): ReflectionEnum {}
716716

717-
/** @implementation-alias ReflectionClassConstant::getValue */
718-
public function getValue(): UnitEnum {}
717+
/**
718+
* @return UnitEnum
719+
* @implementation-alias ReflectionClassConstant::getValue
720+
*/
721+
public function getValue(): mixed {} // TODO Fix return type
719722
}
720723

721724
final class ReflectionEnumBackedCase extends ReflectionEnumUnitCase

ext/reflection/php_reflection_arginfo.h

Lines changed: 2 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: 0b2b52d4f891a594ccfcbcc0edeec97a9e0f80e6 */
2+
* Stub hash: 2c38e77eb52bd19759227b7b9baf42eb21ec81fc */
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)
@@ -560,7 +560,7 @@ ZEND_END_ARG_INFO()
560560
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_ReflectionEnumUnitCase_getEnum, 0, 0, ReflectionEnum, 0)
561561
ZEND_END_ARG_INFO()
562562

563-
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_ReflectionEnumUnitCase_getValue, 0, 0, UnitEnum, 0)
563+
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ReflectionEnumUnitCase_getValue, 0, 0, IS_MIXED, 0)
564564
ZEND_END_ARG_INFO()
565565

566566
#define arginfo_class_ReflectionEnumBackedCase___construct arginfo_class_ReflectionClassConstant___construct

0 commit comments

Comments
 (0)