in EventCentric\UnitOfWork\UnitOfWork::persistAggregate by default it always creates new streams rather than opens it if needed, so it eventually calls EventCentric\EventStore\EventStream::create which does not store committedEventEnvelopes as open method does.
I think thats the problem, because changing EventCentric\UnitOfWork\UnitOfWork 114 line to fallowing:
Hello, Mathias, when i fetch existing object from event store and after updating it try to persist it, i get OptimisticConcurrencyFailed exception.
in EventCentric\UnitOfWork\UnitOfWork::persistAggregate by default it always creates new streams rather than opens it if needed, so it eventually calls EventCentric\EventStore\EventStream::create which does not store committedEventEnvelopes as open method does.
I think thats the problem, because changing EventCentric\UnitOfWork\UnitOfWork 114 line to fallowing:
everything works fine.