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

[CatalogPromotion] Introduce CatalogPromotionCreated event #13473

Merged
merged 2 commits into from
Jan 13, 2022

Conversation

GSadee
Copy link
Member

@GSadee GSadee commented Jan 12, 2022

Q A
Branch? 1.11
Bug fix? no
New feature? no?
BC breaks? no
Deprecations?
Related tickets
License MIT

@GSadee GSadee added Enhancement Minor issues and PRs improving the current solutions (optimizations, typo fixes, etc.). DX Issues and PRs aimed at improving Developer eXperience. Admin AdminBundle related issues and PRs. API APIs related issues and PRs. labels Jan 12, 2022
@GSadee GSadee requested a review from a team as a code owner January 12, 2022 10:53
@probot-autolabeler probot-autolabeler bot added the Documentation Documentation related issues and PRs - requests, fixes, proposals. label Jan 12, 2022
@GSadee GSadee force-pushed the add-catalog-promotion-created-event branch from f596ca2 to a8115c4 Compare January 12, 2022 13:00
Comment on lines +50 to +55
$this->eventBus->dispatch(
new CatalogPromotionCreated($catalogPromotion->getCode()),
$this->calculateStartDateStamp($catalogPromotion)
);

$this->dispatchCatalogPromotionEndedEvent($catalogPromotion);
Copy link
Member

Choose a reason for hiding this comment

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

I'm wondering if in the next iteration we couldn't extract this logic and reuse it here and in Api Platform context. Same for update action

@lchrusciel lchrusciel merged commit a3d7b2e into Sylius:1.11 Jan 13, 2022
@lchrusciel
Copy link
Member

Thanks, Grzegorz! 🥇

@GSadee GSadee deleted the add-catalog-promotion-created-event branch January 13, 2022 12:26
lchrusciel added a commit that referenced this pull request Jan 19, 2022
…ion events from listeners to a separate service (GSadee)

This PR was merged into the 1.11 branch.

Discussion
----------

| Q               | A
| --------------- | -----
| Branch?         | 1.11
| Bug fix?        | no
| New feature?    | no
| BC breaks?      | no
| Deprecations?   | no
| Related tickets | fixes #13473 (review)
| License         | MIT

<!--
 - Bug fixes must be submitted against the 1.10 or 1.11 branch(the lowest possible)
 - Features and deprecations must be submitted against the master branch
 - Make sure that the correct base branch is set

 To be sure you are not breaking any Backward Compatibilities, check the documentation:
 https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html
-->


Commits
-------

2676c9c [CatalogPromotion] Extract dispatching catalog promotion events from listeners to a separate service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin AdminBundle related issues and PRs. API APIs related issues and PRs. Documentation Documentation related issues and PRs - requests, fixes, proposals. DX Issues and PRs aimed at improving Developer eXperience. Enhancement Minor issues and PRs improving the current solutions (optimizations, typo fixes, etc.).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants