Open
Description
If I try to create a proxy of a stdClass
as follows
$proxyFactory = new LazyLoadingValueHolderFactory();
$initializer = function (
& $wrappedObject,
LazyLoadingInterface $proxy
) {
$proxy->setProxyInitializer(null);
$wrappedObject = (object) ['bar' => 'baz'];
return true;
};
$object = $proxyFactory->createProxy(\stdClass::class, $initializer);
$object->bar;
I get the following unexpected error: Undefined property: stdClass::$bar