Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Core][Optimalization] Assign fallback locale for command based requests#13555

Merged
GSadee merged 1 commit into
Sylius:1.11from
lchrusciel:refactor-locale-assigner
Jan 28, 2022
Merged

[Core][Optimalization] Assign fallback locale for command based requests#13555
GSadee merged 1 commit into
Sylius:1.11from
lchrusciel:refactor-locale-assigner

Conversation

@lchrusciel
Copy link
Copy Markdown
Contributor

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

I'm proposing alternative implementation to #13545, that takes into account request stack instead of env & SAPI. This way, we will have coherent behaviour among all envs which, in my opinion, will reduce possibility of bugs that exists on prod on dev, but where not detected by test.

Perhaps, we should consider similar behaviour just as a locale context - so fallbacking in the locale context to config value if CLI is executed

@lchrusciel lchrusciel requested a review from a team as a code owner January 27, 2022 14:29
@lchrusciel lchrusciel changed the base branch from master to 1.11 January 27, 2022 14:30
@lchrusciel
Copy link
Copy Markdown
Contributor Author

The performance change may be neglected between these two implementations: https://blackfire.io/profiles/compare/8fe620d6-4cc9-456b-90a3-861ee485935d/graph

@GSadee GSadee merged commit 6de50f7 into Sylius:1.11 Jan 28, 2022
@GSadee
Copy link
Copy Markdown
Member

GSadee commented Jan 28, 2022

Thank you, Łukasz! 🥇

@lchrusciel lchrusciel deleted the refactor-locale-assigner branch January 28, 2022 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants