Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EZP-30749: Passed explicitly event name to dispatcher #2700

Merged
merged 1 commit into from
Jul 12, 2019

Conversation

adamwojs
Copy link
Member

@adamwojs adamwojs commented Jul 12, 2019

Question Answer
JIRA issue EZP-30749
Bug/Improvement yes
New feature no
Target version master
BC breaks no
Tests pass yes
Doc needed no

Event names should be passed explicitly to the dispatcher, otherwise subscribers will be forced to use eZ\Publish\Core\Event\ instead of eZ\Publish\API\Repository\Events\

TODO:

  • Implement feature / fix a bug.
  • Implement tests.
  • Fix new code according to Coding Standards ($ composer fix-cs).
  • Ask for Code Review.

@adamwojs adamwojs added the Bug label Jul 12, 2019
@adamwojs adamwojs self-assigned this Jul 12, 2019
@adamwojs adamwojs requested review from alongosz and pawbuj July 12, 2019 10:50
use eZ\Publish\API\Repository\Events\Content\PublishVersionEvent as PublishVersionEventInterface;
use eZ\Publish\API\Repository\Events\Content\RevealContentEvent as RevealContentEventInterface;
use eZ\Publish\API\Repository\Events\Content\UpdateContentEvent as UpdateContentEventInterface;
use eZ\Publish\API\Repository\Events\Content\UpdateContentMetadataEvent as UpdateContentMetadataEventInterface;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This long import list makes me feel that maybe use eZ\Publish\API\Repository\Events\Content; and e.g.

$this->eventDispatcher->dispatch(
    new UpdateContentMetadataEvent($content, ...$eventData),
    Content\UpdateContentMetadataEvent::class
);

would be better.

@alongosz
Copy link
Member

Merging. To be tested with #2682.

@alongosz alongosz merged commit c7c705c into master Jul 12, 2019
@alongosz alongosz deleted the events_api_follow_up branch July 12, 2019 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants