Repository navigation
Allow changing the order recalculator - #5110
Merged
Merged
Conversation
mamhoff
force-pushed
the
configurable-order-updater
branch
from
May 31, 2023 10:37
795fb96 to
fcf0e8a
Compare
Codecov Report
@@ Coverage Diff @@
## main #5110 +/- ##
=======================================
Coverage 88.63% 88.64%
=======================================
Files 563 563
Lines 13879 13883 +4
=======================================
+ Hits 12302 12306 +4
Misses 1577 1577
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
This adds a preference to change the order updater. The order updater, a very central piece of Solidus' infrastructure, carries a bit of technical debt. Unfortunately, it's extremely hard to change because every line of this class might have been overwritten by implementors. This configuration allows switching the order updater class, with the intention of being able to introduce breaking changes from a gem without patching the original order recalculator. Additionally, the `order.recalculate` and `order.recalculator` are introduced as aliases to the now deprecated `order.update` and `order.updater` in order to clarify the intention of these methods.
waiting-for-dev
approved these changes
May 31, 2023
waiting-for-dev
left a comment
Contributor
There was a problem hiding this comment.
It looks like a step in the good direction to me! Thanks for taking this.
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This adds a preference to change the order updater. The order updater, a very central piece of Solidus' infrastructure, carries a bit of technical debt. Unfortunately, it's extremely hard to change because every line of this class might have been overwritten by implementors.
This configuration allows switching the order updater class, with the intention of being able to introduce breaking changes from a gem without patching the original order recalculator.
Additionally, the
order.recalculateandorder.recalculatorare introduced as aliases to the now deprecatedorder.updateandorder.updaterin order to clarify the intention of these methods.Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed:
I have updated the README to account for my changes.I have documented new code with YARD.I have opened a PR to update the guides.I have added automated tests to cover my changes.I have attached screenshots to demo visual changes.