FriendsOfOuro / geteventstore-php-core

PHP Client for Event Store HTTP API

Home Page:http://friendsofouro.github.io/geteventstore-php-core/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EventType wrong when reading projections

Akii opened this issue · comments

commented

This is due to the fact that the summary field contains anything but the EventType ("$>") when reading streams that are based on projections. The events (and the data) itself are fetched normally.

A possible solution to this problem is to set the feeds embed mode to FULL and fix the EventStore\StreamFeed\Entry::getType() like this:

return (isset($this->json['eventType'])) ? $this->json['eventType'] : $this->json['summary'];

Should this be an acceptable solution, I'd gladly provide a pull-request.

can you please post a code example or better a failing PHPUnit test case?