I figure out that this code does not work:
class AsymetricPropertyVisibility
{
public private(set) string $foo;
}
$prophet = new Prophet();
$object = $prophet->prophesize(AsymetricPropertyVisibility::class);
$object->foo = 'yo';
$double = $object->reveal();
var_dump($double->foo);
It fails with this error:
Error: Cannot modify private(set) property Fixtures\Prophecy\AsymetricPropertyVisibility::$foo from scope Prophecy\Prophecy\ObjectProphecy
It's logical but not convenient. I think it would be possible to support it after #623 is merged, WDYT?