Remove event aggregator#852
Conversation
| $eventAggregator = $this->getServiceManager()->get(EventAggregator::SERVICE_ID); | ||
| $eventAggregator->put($this->getUri(), new ResourceUpdated($this)); | ||
| $eventManager = $this->getServiceManager()->get(EventManager::SERVICE_ID); | ||
| $eventManager->trigger(new ResourceUpdated($this)); |
There was a problem hiding this comment.
Now it executes the event, before It seems it just aggregated by URI, so when one URI is used, all the events are triggered. Will we have same behavior now? Why did we change it?
There was a problem hiding this comment.
We have changed it because it is deferring event and we do not know what it will imply, it is a breaking changes
There was a problem hiding this comment.
After @andreluizmachado answer would we keep the removal?
There was a problem hiding this comment.
I would say yes, he confirms that this service tries to improve the taskqueue mechanism and avoid multiple calls based on events.
This workaround is good but the problem stay the same. I can close it, but number of triggered events will not changed (only the emition)
And, as discussed with @andreluizmachado , this fix is changing behavior of eventManager for the whole platform and can create side effect. Need to be confirmed by regression tests
There was a problem hiding this comment.
- New code is covered by tests (if applicable)
- Tests are running successfully (old and new ones) on my local machine (if applicable)
- New code is respecting code style rules
- New code is respecting best practices
- New code is not subject to concurrency issues (if applicable)
- Feature is working correctly on my local machine (if applicable)
- Acceptance criteria are respected
- Pull request title and description are meaningful
This PR aims to delete
eventAggregator.After investigation, this service aggregate events and iterate on it to emit them. It also defer emission that is a breaking change, especially for
core_kernel_classes_Resource