yvoyer / domain-event Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Allow to define table definition for user that use DBAL
Error: Class 'Symfony\Component\EventDispatcher\Event' not found
/var/www/project/vendor/star/domain-event/src/Ports/Symfony/EventAdapter.php:17
/var/www/project/vendor/symfony/error-handler/DebugClassLoader.php:337
/var/www/project/vendor/star/domain-event/src/Ports/Symfony/SymfonyPublisher.php:37
/var/www/project/vendor/star/domain-event/src/Ports/Symfony/SymfonyPublisher.php:75
/var/www/project/src/ProductInventory/Infrastructure/EventStore/ProductEventStore.php:40
/var/www/project/src/ProductInventory/Domain/Commands/Product/RegisterProductHandler.php:23
/var/www/project/src/Core/Application/Messaging/ClassMapCommands.php:29
/var/www/project/tests/Functional/Http/Fixtures/ApiFixture.php:38
/var/www/project/tests/Functional/Http/Fixtures/ApiFixture.php:29
/var/www/project/tests/Functional/Http/Controller/ProductShowTest.php:21
use Symfony\Contracts\EventDispatcher\Event;
When rewriting history of events in a store, we might need to push or remove events.
When pushing new events, only fetching by version can cause conflicts with the date.
We should load the event of the aggregate using an order on pushed_on, version ASC
to avoid conflict, and more control on the fetch.
Following comment we should remove the support for event dispatcher <=4.4 in a future release.
I get an error must be an instance of MyApp\Event instance of Star\Component\DomainEvent\Symfony\EventAdapter given
when using the symfony dispatcher in my app.
// services.yml
services:
app.event_publisher:
class: Star\Component\DomainEvent\Symfony\SymfonyPublisher
arguments:
- '@event_dispatcher'
MyApp\MyListener:
tags:
- { name: 'kernel.event_subscriber' }
In order to add more precision to the added event registration, add microsecond to the pushed_on field.
Step to reproduce
Expected result
The collected events count should be 2
Actual result
The collected events count is 1
This has the effect of not publishing twice the event when given to the EventPublisher
When using JSON, we can fetch data using JSON in query instead of having to pass throught php to read data.
Steps to reproduce:
AggregateWasCreated
$this->mutate(new OtherEvent())
Inside onAggregateWasCreated()
When collecting uncommited events, the order is not reflecting the execution
$aggregate = Aggregate::create();
$events = $aggregate->uncommitedEvents();
// $events[0] => OtherEvent
// $events[1] => AggregateWasCreated
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.