Repository navigation
1.1.4
This release the issue for serialization #32
For example, You set injectors in several properties as a singleton instance.
class A{}
class B{}
class C{}
$a = new A;
$b = new B;
$c = new C;
$a->c = $b->c = $c;
var_dump(spl_object_hash($a->c) === spl_object_hash($b->c)); // truebut it became no longer a singleton instance after serialization / un-serialization.
list($x, $y) = [unserialize(serialize($a)), unserialize(serialize($b))];
var_dump(spl_object_hash($x->c) === spl_object_hash($y->c)); // falseThis become a problem for singleton instance with multiple Injectors.
This PR fix this issue. Different injectors share same singleton instance pool by static prop with injector ID.