With definition, that has been used instead of reference, container used to create 2 instances of initializer: one with service id, and one "anonymous", described by spl_object_hash in a container, which broke stateful initializers: in my case initializer was also used to reset state before next scenario/example, and initializing and resetting happened with different instances of initializer.
If the fix and test are OK, let me know if you want me to cherry-pick the fix onto master and created additional pull request for master.
Thanks @pamil ! It's a pleasure to be able to specify an updated version in composer.json in less than 24 hours since the pull request has been created.
With definition, that has been used instead of reference, container used to create 2 instances of initializer: one with service id, and one "anonymous", described by spl_object_hash in a container, which broke stateful initializers: in my case initializer was also used to reset state before next scenario/example, and initializing and resetting happened with different instances of initializer.
If the fix and test are OK, let me know if you want me to cherry-pick the fix onto master and created additional pull request for master.