{"action":"created","issue":{"url":"https://api.github.com/repos/dbellettini/broadway-eventstore/issues/3","labels_url":"https://api.github.com/repos/dbellettini/broadway-eventstore/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/dbellettini/broadway-eventstore/issues/3/comments","events_url":"https://api.github.com/repos/dbellettini/broadway-eventstore/issues/3/events","html_url":"https://github.com/dbellettini/broadway-eventstore/issues/3","id":68893556,"number":3,"title":"Get event version from the eventstore","user":{"login":"Akii","id":1204017,"avatar_url":"https://avatars.githubusercontent.com/u/1204017?v=3","gravatar_id":"","url":"https://api.github.com/users/Akii","html_url":"https://github.com/Akii","followers_url":"https://api.github.com/users/Akii/followers","following_url":"https://api.github.com/users/Akii/following{/other_user}","gists_url":"https://api.github.com/users/Akii/gists{/gist_id}","starred_url":"https://api.github.com/users/Akii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Akii/subscriptions","organizations_url":"https://api.github.com/users/Akii/orgs","repos_url":"https://api.github.com/users/Akii/repos","events_url":"https://api.github.com/users/Akii/events{/privacy}","received_events_url":"https://api.github.com/users/Akii/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-16T10:22:49Z","updated_at":"2015-04-18T15:30:33Z","closed_at":null,"body":"It's (imho) very wrong to generate the events version (https://github.com/dbellettini/broadway-eventstore/blob/master/src/EventStore/Broadway/BroadwayEventStore.php#L67).\r\n\r\nThe version is a very important piece when it comes to validate applying them to aggregates as well as resolving conflicts. Instead, the information should come directly from the store. This can be achieved via the URL \"aggregate-identifier/version\" or, when the EmbedMode::RICH is used, it will be part of the payload.\r\n\r\nThis is probably also a \"downstream\" bug/feature that must then be implemented in the eventstore-client. Just checked that I patched the file StreamFeed/Entry to return the event version, so the eventstore-client has no API for this yet (it really should).\r\n\r\nIf you guys agree, I'd create a PR for both the client and this package getting the event version either from the payload or url."},"comment":{"url":"https://api.github.com/repos/dbellettini/broadway-eventstore/issues/comments/94174243","html_url":"https://github.com/dbellettini/broadway-eventstore/issues/3#issuecomment-94174243","issue_url":"https://api.github.com/repos/dbellettini/broadway-eventstore/issues/3","id":94174243,"user":{"login":"dbellettini","id":325358,"avatar_url":"https://avatars.githubusercontent.com/u/325358?v=3","gravatar_id":"","url":"https://api.github.com/users/dbellettini","html_url":"https://github.com/dbellettini","followers_url":"https://api.github.com/users/dbellettini/followers","following_url":"https://api.github.com/users/dbellettini/following{/other_user}","gists_url":"https://api.github.com/users/dbellettini/gists{/gist_id}","starred_url":"https://api.github.com/users/dbellettini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbellettini/subscriptions","organizations_url":"https://api.github.com/users/dbellettini/orgs","repos_url":"https://api.github.com/users/dbellettini/repos","events_url":"https://api.github.com/users/dbellettini/events{/privacy}","received_events_url":"https://api.github.com/users/dbellettini/received_events","type":"User","site_admin":false},"created_at":"2015-04-18T15:30:33Z","updated_at":"2015-04-18T15:30:33Z","body":"This is worse than I assumed, using `$i++` had been hiding #1 "}}