Skip to content

Commit 377f515

Browse files
[DependencyInjection] Fix preloading LazyClosure
1 parent 5f311ea commit 377f515

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Dumper/PhpDumper.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,6 +1208,7 @@ private function addNewInstance(Definition $definition, string $return = '', ?st
12081208
|| ($callable[0] instanceof Definition && !$this->definitionVariables->offsetExists($callable[0]))
12091209
))) {
12101210
$initializer = 'fn () => '.$this->dumpValue($callable[0]);
1211+
$this->preload[LazyClosure::class] = LazyClosure::class;
12111212

12121213
return $return.LazyClosure::getCode($initializer, $callable, $class, $this->container, $id).$tail;
12131214
}

0 commit comments

Comments
 (0)