8000 Fix ShopBasedCartContext resetting by dnna · Pull Request #9613 · Sylius/Sylius · GitHub
[go: up one dir, main page]

Skip to content

Fix ShopBasedCartContext resetting #9613

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

Merged
merged 1 commit into from
Jul 26, 2018
Merged

Fix ShopBasedCartContext resetting #9613

merged 1 commit into from
Jul 26, 2018

Conversation

dnna
Copy link
Contributor
@dnna dnna commented Jul 24, 2018
Q A
Branch? 1.1
Bug fix? yes
New feature? no
BC breaks? no
License MIT

ShopBasedCartContext keeps an instance of the cart internally. When using PHP-PM, this attribute needs to be reset at the end of each request otherwise unexpected behaviors happen. This solution uses the kernel.reset tag introduced specifically for this purpose in symfony/symfony#23984

@pamil pamil added the Potential Bug Potential bugs or bugfixes, that needs to be reproduced. label Jul 26, 2018
@pamil pamil merged commit 3170aa9 into Sylius:1.1 Jul 26, 2018
@pamil
Copy link
Contributor
pamil commented Jul 26, 2018

Thank you, Dimosthenis! 🎉 Don't hesitate to share your findings about running Sylius in PHP-PM :)

@pamil
Copy link
Contributor
pamil commented Jul 26, 2018

Although it could use some quick unit test, I'll try to prepare one.

@dnna dnna deleted the resetnewcart branch July 26, 2018 10:08
@dnna
Copy link
Contributor Author
dnna commented Jul 26, 2018

Thank you! I wasn't sure how to unit test this part. So far it seems to be working great and fast with PHP-PM after this and #9608 :) It will go for user testing in the next few weeks, so I'll be happy to make PR for any other issues we find running it this way.

@pamil
Copy link
Contributor
pamil commented Jul 26, 2018

Awesome to hear that! Added some tests for that new method in #9617.

@czende
Copy link
Contributor
czende commented Aug 7, 2018

@dnna Are you using PHP-PM with or without Docker? I've done some testing with nginx setup and it seems to be mind-blowing!

@dnna
Copy link
Contributor Author
dnna commented Aug 7, 2018

@czende I'm using it with Docker. The performance gain is pretty insane, but there are unfortunately some hard-to-fix leaks (see #9629) especially in the admin that cause inconsistent behavior. The shop front-end seems quite stable and I haven't noticed any issues there since merging this PR. All in all I'd say its not production ready yet, but its closer than I expected!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Potential Bug Potential bugs or bugfixes, that needs to be reproduced.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0