Skip to content

Commit 974397d

Browse files
committed
Add comment.
1 parent b8203aa commit 974397d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/EnvMapper.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ private function typeNormalize(string $val, \ReflectionProperty $rProp): int|flo
8585
if (is_a($name, \BackedEnum::class, true)) {
8686
$rEnum = new \ReflectionEnum($name);
8787
$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.
8890
assert($backingType instanceof \ReflectionNamedType);
8991
$isIntBacked = $backingType->getName() === 'int';
9092

0 commit comments

Comments
 (0)