-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add back Variant#find_or_build_default_price #4960
Add back Variant#find_or_build_default_price #4960
Conversation
d8df32b
to
ae37846
Compare
Codecov Report
@@ Coverage Diff @@
## master #4960 +/- ##
=======================================
Coverage 86.69% 86.69%
=======================================
Files 578 578
Lines 14681 14684 +3
=======================================
+ Hits 12728 12731 +3
Misses 1953 1953
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
def find_or_build_default_price | ||
default_price_or_build | ||
end | ||
deprecate :find_or_build_default_price, deprecator: Spree::Deprecation |
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.
deprecate :find_or_build_default_price, deprecator: Spree::Deprecation | |
deprecate :find_or_build_default_price, :default_price_or_build, deprecator: Spree::Deprecation |
👆 I think this will generate a better deprecation message.
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're trying to get better with yard documentation, so here we have a nice opportunity to use the @deprecated
tag: https://rubydoc.info/gems/yard/file/docs/Tags.md#deprecated 🙂
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.
Thanks, @spaghetticode! I left one suggestion.
def find_or_build_default_price | ||
default_price_or_build | ||
end | ||
deprecate :find_or_build_default_price, deprecator: Spree::Deprecation |
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're trying to get better with yard documentation, so here we have a nice opportunity to use the @deprecated
tag: https://rubydoc.info/gems/yard/file/docs/Tags.md#deprecated 🙂
This method was renamed to `default_price_or_build` with 6420b10, but this was a breaking change given it was released with Solidus 3.1. This commit reintroduces the method as an alias but with deprecation.
ae37846
to
65a6f2d
Compare
@kennyadsl @waiting-for-dev thanks for the precious suggestions ❤️ |
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.
Lovely, @spaghetticode!
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
[v3.3] Merge pull request #4960 from spaghetticode/add-back-variant-find_or_build_default_price
Please, use #default_price_or_build instead. Ref solidusio#4960
Please, use #default_price_or_build instead. Ref solidusio#4960
Please, use #default_price_or_build instead. Ref solidusio#4960
Please, use #default_price_or_build instead. Ref solidusio#4960
Please, use #default_price_or_build instead. Ref solidusio#4960
Please, use #default_price_or_build instead. Ref solidusio#4960
Summary
This method was renamed to
default_price_or_build
with 6420b10, but this was a breaking change given it was released with Solidus 3.1. This commit reintroduces the method as an alias but with deprecation.Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs: