We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8203aa commit 974397dCopy full SHA for 974397d
src/EnvMapper.php
@@ -85,6 +85,8 @@ private function typeNormalize(string $val, \ReflectionProperty $rProp): int|flo
85
if (is_a($name, \BackedEnum::class, true)) {
86
$rEnum = new \ReflectionEnum($name);
87
$backingType = $rEnum->getBackingType();
88
+ // On PHP 8.1, getBackingType() returns ReflectionType, which is not specific enough.
89
+ // Remove this once 8.2 is the minimum version.
90
assert($backingType instanceof \ReflectionNamedType);
91
$isIntBacked = $backingType->getName() === 'int';
92
0 commit comments