-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[API] Fix cart blaming #12512
[API] Fix cart blaming #12512
Conversation
e6938c1
to
6505132
Compare
6505132
to
34c8357
Compare
src/Sylius/Bundle/ApiBundle/EventListener/CartBlamerListener.php
Outdated
Show resolved
Hide resolved
a1eaa4b
to
279a467
Compare
383467c
to
3ae7589
Compare
3ae7589
to
7aaf9d3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to extract \Sylius\Bundle\CoreBundle\EventListener\UserCartRecalculationListener
as well, as this service has super annoying behavior of recalculating order for every request in Api. Partially related to what we are doing here. Can be done in separate PR however.
src/Sylius/Bundle/ApiBundle/EventListener/ApiCartBlamerListener.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/EventListener/ApiCartBlamerListener.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/EventListener/ApiCartBlamerListener.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/SectionResolver/ShopApiUriBasedSectionResolver.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ApiBundle/spec/SectionResolver/ShopApiUriBasedSectionResolverSpec.php
Show resolved
Hide resolved
71db700
to
dfa74f8
Compare
dfa74f8
to
9fd8d13
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned before, I would still consider extracting cart blaming logic to command + movement of UserCartRecalculationListener
to shop namespace
<tag name="kernel.event_listener" event="sylius.user.security.implicit_login" method="onImplicitLogin" /> | ||
<tag name="kernel.event_listener" event="security.interactive_login" method="onInteractiveLogin" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you check if both cases are needed in Api?
Thanks, Grzegorz & Artur! 🥇 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is missing PHPSpec for ApiCartBlamerListener
… (arti0090) This PR was merged into the 1.10-dev branch. Discussion ---------- | Q | A | --------------- | ----- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Related tickets | continues #12512 | License | MIT <!-- - Bug fixes must be submitted against the 1.7 or 1.8 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 ------- 8e764fe Remove unused api cart blamer method add missing spec
Based on #12509