qandidate-labs/broadway — pull request #19 by simensen (2014-08-27 16:47:24+00:00)
Title: ID can also be an object that implements __toString

Here is my use case:

```php
/**
* @test
*/
public function it_should_suspend()
{
$userId = UserId::generate();

$this->scenario
->given([UserWasRegistered::with($userId, new Person)], $userId)
->when(SuspendUser::with($userId))
->then([
UserWasSuspended::with($userId),
]);
}
```

This is loosely related to #18 in that I ran into both of these problems more or less at the same time. Since my ID is an object I was going to have to do a lot of `(string) $id` in a lot of weird places and it was becoming unmanageable.

The issues were mainly around the fact that the `InMemoryEventStore` were using `$id` raw and assuming it was a stringish looking thing. I made changes to `DBALEventStore` to keep it consistent.

There should be a test to make sure this functionality continues to work but I wanted to make sure I'm on the right track here first. All of my domain models have an actual value object to represent their ID so this is going to be a big deal for me to have to change if I cannot pass the ID as-is in many places.