Comments (15)
I'd prefer commit
since it writes the uncommitted domain events for the given aggregate root to the event store.
from broadway.
👍 for commit
from broadway.
Are you talking about the RepositoryInterface
? If so, why not simply save
?
I don't think that the repository interface should expose the fact that you have "uncommitted events" in your aggregate (that's an implementation detail linked to event soucing IMO).
And commit
kinda sounds like you have transactions involved.
Just my two cents.
from broadway.
👍 for save
, same arguments as @kimlai .
from broadway.
👍 for save
, though commit
would be acceptable as well.
I currently create my own repository interfaces and provide a Broadway EventSourcedRepository implementation. In my own interfaces, I'm using save
and passing to add
.
from broadway.
I'm currently using the default provided EventSourcedRepository but my command handlers contain a save()
method that then passes off to the repository's add()
from broadway.
Seems to me that renaming to save()
is the way to go. If @wjzijderveld is 👍 as well I'd say we're happy for a PR (or we'll do it).
from broadway.
👍
from broadway.
I was looking doctrine, and flush
seems used. Any thoughts on it ?
from broadway.
@harikt is totally another layer, one is a persistent transactional layer that has flush falvor, the other is not really that and i doubt it should that imo.
from broadway.
Aye, following @kimlai's comments, save
seems more appropriate, I hadn't even considered the interface, just the implementation.
from broadway.
Save would work for me as well 👍
from broadway.
Fine with save
👍
from broadway.
A PR for this would be great. 👍
from broadway.
@asm89 I'll take it
from broadway.
Related Issues (20)
- drop test/Broadway/TestCase
- make PHPUnit a dependency HOT 5
- test the test helpers with examples HOT 2
- Built-in asynchronous way to run processors? HOT 3
- Example/explanation on event sourcing for aggregate roots HOT 1
- What is the overall state of the project? Is it GDPR ready? HOT 2
- Simple Command Bus - Manage Throwable exceptions
- Could you do a new release? HOT 2
- Are there any plans to update broadway? HOT 1
- Asymmetry between EventBus interface and EventListener interface HOT 2
- Broadway does not seem to survive hot upgrades HOT 2
- duck-typing vs interface HOT 1
- Replaying events to rebuild elastic search index HOT 1
- PHP 8 support HOT 2
- Processor after projector HOT 2
- Aggregator HOT 3
- Indirect development dependency used in src ConcurrencyConflictResolvers
- no recent tags? HOT 1
- Get uncommitted events without empty the aggregate HOT 4
- Give serializers flexibility to map based on event type
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from broadway.