- Notifications
You must be signed in to change notification settings - Fork2
Releases: gpslab/domain-event-bundle
Release 2.3.1
e02fad1
Compare
Changelog (since2.3.0...2.3.1
)
- bug#12 Compatible with Doctrine ORM >= 2.7 (@peter-gribanov)
- bug#13 Configure GitHub Actions (@peter-gribanov)
- bug#14 Build from GitHub CI (@peter-gribanov)
- bug#15 Correct show PHP version in GitHub CI (@peter-gribanov)
- bug#16 Change badges in README file (@peter-gribanov)
Assets2
Uh oh!
There was an error while loading.Please reload this page.
Release 2.3.0
0342c65
Compare
Changelog (since2.2.0...2.3.0
)
- feature#10 Allow use Symfony 5 (@peter-gribanov)
- feature#11 Use PHPUnit 4.8.36 with namespaces (@peter-gribanov)
Assets2
Uh oh!
There was an error while loading.Please reload this page.
Release 2.2.0
2478554
Compare
Changelog (since2.1.4...2.2.0
)
- bug#8 Not test with Doctrine 2.4 (@peter-gribanov)
- feature#7 Install
GpsLabDomainEventBundle
by Symfony Flex (@peter-gribanov) - bug#6 Change composer requirements (@peter-gribanov)
Assets2
Uh oh!
There was an error while loading.Please reload this page.
Release 2.1.4
6f22238
Compare
Changelog (since2.1.3...2.1.4
)
- bug#5 Correct project type to "symfony-bundle" (@peter-gribanov)
- bug#4 Correct test build with Travic CI (@peter-gribanov)
Assets2
Uh oh!
There was an error while loading.Please reload this page.
Release 2.1.3
Compare
Changelog (since2.1.2...2.1.3
)
- Restore tests
- Change build icons
Assets2
Uh oh!
There was an error while loading.Please reload this page.
Release 2.1.2
Compare
Changelog (since2.1.1...2.1.2
)
- Pull events from initialized Doctrine proxy classes [Bugfix]
- Test on PHP 7.2
- Test with Symfony 3.4, 4.1 and Doctrine 2.6
- Create service aliases for EventBus and EventQueue
- Subscribers tagged automatically
Assets2
Uh oh!
There was an error while loading.Please reload this page.
Release 2.1.1
Compare
Changelog (since2.1.0...2.1.1
)
Added ability tosubscribe to events.
useGpsLab\Domain\Event\Event;useGpsLab\Domain\Event\Listener\Subscriber;class SendEmailOnPurchaseOrderCreatedimplements Subscriber{private$mailer;publicfunction__construct(\Swift_Mailer$mailer) {$this->mailer =$mailer; }publicstaticfunctionsubscribedEvents() {return [ PurchaseOrderCreatedEvent::class => ['onPurchaseOrderCreated'], ]; }publicfunctiononPurchaseOrderCreated(PurchaseOrderCreatedEvent$event) {$message =$this->mailer ->createMessage() ->setTo('recipient@example.com') ->setBody(sprintf('Purchase order created at %s for customer #%s',$event->getCreateAt()->format('Y-m-d'),$event->getCustomer()->getId() ));$this->mailer->send($message); }}
Register event subscriber
services:acme.domain.purchase_order.event.created.send_email_subscriber:class:SendEmailOnPurchaseOrderCreatedarguments:[ '@mailer' ]tags: -{ name: domain_event.subscriber }
Assets2
Uh oh!
There was an error while loading.Please reload this page.
Release 2.1.0
Compare
Changelog (since2.0.1...2.1.0
)
Publish domain events on Doctrine events
PreRemove
/PostRemove
[Bugfix]Befire:
PreRemove
andPostRemove
events is ignored.After:
If you need do somthing after entity is removed you can usePreRemove
/PostRemove
Lifecycle Events./** * @ORM\Table(name="article") * @ORM\Entity() * @ORM\HasLifecycleCallbacks() */class Article{/** * @ORM\Id * @ORM\GeneratedValue(strategy="IDENTITY") * @ORM\Column(name="id", type="ArticleId", nullable=false) */private$id;/** * @ORM\Column(name="cover", type="string", length=255, nullable=true) */private$cover;// .../** * @ORM\PreRemove() */publicfunctionpreRemove() {// remove cover after remove article$this->raise(newArticleRemoved($this->id,$this->cover)); }/** * @ORM\PostRemove() */publicfunctionpostRemove() {// $this->id is null }}
Assets2
Uh oh!
There was an error while loading.Please reload this page.
Release 2.0.1
Compare
Changelog (since2.0.0...2.0.1
)
- Correct
domain_event.bus.listener_located
service name.
Assets2
Uh oh!
There was an error while loading.Please reload this page.
Release 2.0.0
Compare
Changelog (since1.1.0...2.0.0
)
Configuration
Before:
gpslab_domain_event:# Event bus service# Support 'listener_locator', 'queue' or a custom service# As a default used 'listener_locator'bus:'listener_locator'# Event queue service# Support 'memory', 'memory_unique' or a custom service# As a default used 'memory_unique'queue:'memory_unique'# Event listener locator# Support 'voter', 'named_event' or custom service# As a default used 'named_event'locator:'named_event'# Evant name resolver used in 'named_event' event listener locator# Support 'event_class', 'event_class_last_part', 'named_event' or a custom service# As a default used 'event_class'name_resolver:'event_class'
After:
gpslab_domain_event:# Event bus service# Support 'listener_located', 'queue' or a custom service# As a default used 'listener_located'bus:'listener_located'# Event queue service# Support 'pull_memory', 'subscribe_executing' or a custom service# As a default used 'pull_memory'queue:'pull_memory'# Event listener locator# Support 'symfony', 'container', 'direct_binding' or custom service# As a default used 'symfony'locator:'symfony'# Publish domain events post a Doctrine flush event# As a default used 'false'publish_on_flush:true
Publish domain events
- Publish domain events post a Doctrine flush event.
Removed locators
- Removed
domain_event.locator.voter
service. - Removed
domain_event.locator.named_event
service. - Ignore tag
domain_event.locator.voter
forVoterLocator
. - Ignore tag
domain_event.locator.named_event
forNamedEventLocator
.
Created locators
- Created
domain_event.locator.symfony
service ofGpsLab\Domain\Event\Listener\Locator\SymfonyContainerEventListenerLocator
locator. - Created
domain_event.locator.container
service ofGpsLab\Domain\Event\Listener\Locator\ContainerEventListenerLocator
locator. - Created
domain_event.locator.direct_binding
service ofGpsLab\Domain\Event\Listener\Locator\DirectBindingEventListenerLocator
locator.
Removed name resolvers
- Removed
domain_event.name_resolver.event_class_last_part
name resolver service. - Removed
domain_event.name_resolver.event_class
name resolver service. - Removed
domain_event.name_resolver.named_event
name resolver service.
Removed queue
- Removed
domain_event.queue.memory
queue service. - Removed
domain_event.queue.memory_unique
queue service.
Created queue
- Created
domain_event.queue.pull_memory
service ofGpsLab\Domain\Event\Queue\Pull\MemoryPullEventQueue
queue. - Created
domain_event.queue.subscribe_executing
service ofGpsLab\Domain\Event\Queue\Subscribe\ExecutingSubscribeEventQueue
queue.
Changed event bus
Changed class for
domain_event.bus.listener_locator
.Before used
GpsLab\Domain\Event\Bus\Bus
class.After used
GpsLab\Domain\Event\Bus\ListenerLocatedEventBus
class.Service
domain_event.bus.queue
not use adomain_event.bus.listener_locator
service.
Assets2
Uh oh!
There was an error while loading.Please reload this page.