a projection that handles a few events and not all, thus entering the handleStreamWithHandlers method.
Looking at the code for that method it does not increment the processed events ($this->eventCounter) until it encounters a registered message handler. Therefore the position of 'streamed' events will not be persisted until a registered message handler is encountered.
I believe this is not very problematic except for process managers and unless you stop the projection and change the registered handlers and restart the projection. The projection will then start processing events that were created before the code change, which is probably not what you would want for process managers.
Given
handleStreamWithHandlers
method.Looking at the code for that method it does not increment the processed events ($this->eventCounter) until it encounters a registered message handler. Therefore the position of 'streamed' events will not be persisted until a registered message handler is encountered.
I believe this is not very problematic except for process managers and unless you stop the projection and change the registered handlers and restart the projection. The projection will then start processing events that were created before the code change, which is probably not what you would want for process managers.
The fix is I believe to invert these two statements? https://github.com/prooph/pdo-event-store/blob/master/src/Projection/PdoEventStoreProjector.php#L653-L657 Thus always increment any processed events regardless if they have a handler registered.
I hope this explanation is clear... :-/