Currently, if there is an object in the properties of an object, only the sha1 will be compared (meaning that only a new object instead of the old one, not the modified one, will be compared to the old one).
The problem lies within the fact that the object is not copied, but is a reference since php5 :
<?php
class Foo {
public $bar = 'baz';
}
$foo = new Foo;
$bar = $foo;
$foo->bar = 'fubar';
var_dump($foo->bar, $bar->bar); // will dump fubar fubar
But I also can't clone the object if it is an object, because the sha1 will differ from one clone to another, considering it to be a whole new object altogether.
I think I should check if i should, in the data generated by the snapshots, store the value into a value object setting also the type, transforming it into something I may understand... (like an object snapshot, or whatever).
Currently, if there is an object in the properties of an object, only the sha1 will be compared (meaning that only a new object instead of the old one, not the modified one, will be compared to the old one).
The problem lies within the fact that the object is not copied, but is a reference since php5 :
But I also can't clone the object if it is an object, because the sha1 will differ from one clone to another, considering it to be a whole new object altogether.
I think I should check if i should, in the data generated by the snapshots, store the value into a value object setting also the type, transforming it into something I may understand... (like an object snapshot, or whatever).