On Fri, Jun 14, 2024, at 8:15 PM, Larry Garfield wrote: And of course I got the code sample wrong. It should be:
> class Service { > public function __construct(private ServiceA $a, private ServiceB $b) {} > } > > $c = some_container(); > > $init = fn() => $this->__construct($c->get(ServiceA::class), > $c->get(ServiceB::class)); > > $service = new > ReflectionLazyObjectFactory(Service::class)->newGhostInstance(init); Sorry about that. --Larry Garfield