-
-
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
[Core] Implement simple ShopperContext #5196
[Core] Implement simple ShopperContext #5196
Conversation
802d152
to
ca7005c
Compare
public function getLocaleCode(); | ||
|
||
/** | ||
* @return CustomerInterface |
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.
CustomerInterface|null
ca7005c
to
a931d54
Compare
/** | ||
* @author Paweł Jędrzejewski <[email protected]> | ||
*/ | ||
interface ShopperContextInterface |
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.
What do you think about normalizing methods in current interfaces (one has getCurrentX()
, the other one - getX()
) and then just extending them here?
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.
@pamil I think it could be good, but let's leave that for a separate PR, we definitely need to normalize methods on all these contexts.
Nice! 👍 |
…r-context [Core] Implement simple ShopperContext
All services, form types, etc. should be stateless, but sometimes we need to have access (in routing, or other contexts) to currently active channel, currency, locale and customer. This service simplifies this and I have also added this info to the web debug toolbar. So as a developer, you can always check the currently selected context.
This is the first step to clean up all the contexts together and unify their behavior and usage.