Skip to content

Commit ca85af9

Browse files
committed
Add closed resource string coercion type checks
1 parent 878c735 commit ca85af9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tests/Type/Coercer/StringTypeCoercerTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ protected static function castValues(bool $normalize): iterable
7575
'stream' => 'stream',
7676
default => $default,
7777
},
78+
\get_debug_type($value) === 'resource (closed)' => 'resource',
7879
$value === IntBackedEnumStub::ExampleCase => (string) IntBackedEnumStub::ExampleCase->value,
7980
$value === StringBackedEnumStub::ExampleCase => StringBackedEnumStub::ExampleCase->value,
8081
$value === UnitEnumStub::ExampleCase => UnitEnumStub::ExampleCase->name,

0 commit comments

Comments
 (0)