Skip to content

Commit

Permalink
Adjust pretty name of closures on PHP 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Apr 16, 2024
1 parent ae1d949 commit 37b2df9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Caster/ReflectionCaster.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static function castClosure(\Closure $c, array $a, Stub $stub, bool $isNe

$a = static::castFunctionAbstract($c, $a, $stub, $isNested, $filter);

if (!str_contains($c->name, '{closure}')) {
if (!str_contains($c->name, '{closure')) {
$stub->class = isset($a[$prefix.'class']) ? $a[$prefix.'class']->value.'::'.$c->name : $c->name;
unset($a[$prefix.'class']);
}
Expand Down

0 comments on commit 37b2df9

Please sign in to comment.